Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a0919ff9
Commit
a0919ff9
authored
Apr 09, 2004
by
Karsten Keil
Committed by
David S. Miller
Apr 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ISDN]: Fix kernel PPP/IPPP active/passiv filter code.
parent
a26d6295
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
8 deletions
+31
-8
drivers/isdn/i4l/isdn_ppp.c
drivers/isdn/i4l/isdn_ppp.c
+21
-6
drivers/net/ppp_generic.c
drivers/net/ppp_generic.c
+10
-2
No files found.
drivers/isdn/i4l/isdn_ppp.c
View file @
a0919ff9
...
...
@@ -606,7 +606,7 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
if
(
copy_from_user
(
&
uprog
,
(
void
*
)
arg
,
sizeof
(
uprog
)))
return
-
EFAULT
;
if
(
uprog
.
len
>
0
&&
uprog
.
len
<
65536
)
{
if
(
uprog
.
len
>
0
)
{
len
=
uprog
.
len
*
sizeof
(
struct
sock_filter
);
code
=
kmalloc
(
len
,
GFP_KERNEL
);
if
(
code
==
NULL
)
...
...
@@ -1121,7 +1121,12 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
* the filter instructions are constructed assuming
* a four-byte PPP header on each packet (which is still present) */
skb_push
(
skb
,
4
);
skb
->
data
[
0
]
=
0
;
/* indicate inbound */
{
u_int16_t
*
p
=
(
u_int16_t
*
)
skb
->
data
;
*
p
=
0
;
/* indicate inbound in DLT_LINUX_SLL */
}
if
(
is
->
pass_filter
.
filter
&&
sk_run_filter
(
skb
,
is
->
pass_filter
.
filter
,
...
...
@@ -1263,8 +1268,13 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
* the filter instructions are constructed assuming
* a four-byte PPP header on each packet */
skb_push
(
skb
,
4
);
skb
->
data
[
0
]
=
1
;
/* indicate outbound */
*
(
u_int16_t
*
)(
skb
->
data
+
2
)
=
htons
(
proto
);
{
u_int16_t
*
p
=
(
u_int16_t
*
)
skb
->
data
;
*
p
++
=
htons
(
4
);
/* indicate outbound in DLT_LINUX_SLL */
*
p
=
htons
(
proto
);
}
if
(
ipt
->
pass_filter
.
filter
&&
sk_run_filter
(
skb
,
ipt
->
pass_filter
.
filter
,
...
...
@@ -1457,8 +1467,13 @@ int isdn_ppp_autodial_filter(struct sk_buff *skb, isdn_net_local *lp)
* earlier.
*/
skb_pull
(
skb
,
IPPP_MAX_HEADER
-
4
);
skb
->
data
[
0
]
=
1
;
/* indicate outbound */
*
(
u_int16_t
*
)(
skb
->
data
+
2
)
=
htons
(
proto
);
{
u_int16_t
*
p
=
(
u_int16_t
*
)
skb
->
data
;
*
p
++
=
htons
(
4
);
/* indicate outbound in DLT_LINUX_SLL */
*
p
=
htons
(
proto
);
}
drop
|=
is
->
pass_filter
.
filter
&&
sk_run_filter
(
skb
,
is
->
pass_filter
.
filter
,
...
...
drivers/net/ppp_generic.c
View file @
a0919ff9
...
...
@@ -994,7 +994,11 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
/* check if we should pass this packet */
/* the filter instructions are constructed assuming
a four-byte PPP header on each packet */
*
skb_push
(
skb
,
2
)
=
1
;
{
u_int16_t
*
p
=
(
u_int16_t
*
)
skb_push
(
skb
,
2
);
*
p
=
htons
(
4
);
/* indicate outbound in DLT_LINUX_SLL */
;
}
if
(
ppp
->
pass_filter
.
filter
&&
sk_run_filter
(
skb
,
ppp
->
pass_filter
.
filter
,
ppp
->
pass_filter
.
len
)
==
0
)
{
...
...
@@ -1537,7 +1541,11 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
/* check if the packet passes the pass and active filters */
/* the filter instructions are constructed assuming
a four-byte PPP header on each packet */
*
skb_push
(
skb
,
2
)
=
0
;
{
u_int16_t
*
p
=
(
u_int16_t
*
)
skb_push
(
skb
,
2
);
*
p
=
0
;
/* indicate inbound in DLT_LINUX_SLL */
}
if
(
ppp
->
pass_filter
.
filter
&&
sk_run_filter
(
skb
,
ppp
->
pass_filter
.
filter
,
ppp
->
pass_filter
.
len
)
==
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment