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
Kirill Smelkov
linux
Commits
13cb21df
Commit
13cb21df
authored
Jun 19, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/jgarzik/net-drivers-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
ca587a13
c133d82e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
32 deletions
+30
-32
drivers/net/ppp_async.c
drivers/net/ppp_async.c
+1
-3
net/core/flow.c
net/core/flow.c
+8
-5
net/ipv4/arp.c
net/ipv4/arp.c
+9
-8
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/arp_tables.c
+6
-3
net/ipv6/icmp.c
net/ipv6/icmp.c
+0
-6
net/ipv6/ndisc.c
net/ipv6/ndisc.c
+6
-7
No files found.
drivers/net/ppp_async.c
View file @
13cb21df
...
@@ -147,7 +147,6 @@ ppp_asynctty_open(struct tty_struct *tty)
...
@@ -147,7 +147,6 @@ ppp_asynctty_open(struct tty_struct *tty)
struct
asyncppp
*
ap
;
struct
asyncppp
*
ap
;
int
err
;
int
err
;
MOD_INC_USE_COUNT
;
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
ap
=
kmalloc
(
sizeof
(
*
ap
),
GFP_KERNEL
);
ap
=
kmalloc
(
sizeof
(
*
ap
),
GFP_KERNEL
);
if
(
ap
==
0
)
if
(
ap
==
0
)
...
@@ -183,7 +182,6 @@ ppp_asynctty_open(struct tty_struct *tty)
...
@@ -183,7 +182,6 @@ ppp_asynctty_open(struct tty_struct *tty)
out_free:
out_free:
kfree
(
ap
);
kfree
(
ap
);
out:
out:
MOD_DEC_USE_COUNT
;
return
err
;
return
err
;
}
}
...
@@ -223,7 +221,6 @@ ppp_asynctty_close(struct tty_struct *tty)
...
@@ -223,7 +221,6 @@ ppp_asynctty_close(struct tty_struct *tty)
if
(
ap
->
tpkt
!=
0
)
if
(
ap
->
tpkt
!=
0
)
kfree_skb
(
ap
->
tpkt
);
kfree_skb
(
ap
->
tpkt
);
kfree
(
ap
);
kfree
(
ap
);
MOD_DEC_USE_COUNT
;
}
}
/*
/*
...
@@ -351,6 +348,7 @@ ppp_asynctty_wakeup(struct tty_struct *tty)
...
@@ -351,6 +348,7 @@ ppp_asynctty_wakeup(struct tty_struct *tty)
static
struct
tty_ldisc
ppp_ldisc
=
{
static
struct
tty_ldisc
ppp_ldisc
=
{
.
owner
=
THIS_MODULE
,
.
magic
=
TTY_LDISC_MAGIC
,
.
magic
=
TTY_LDISC_MAGIC
,
.
name
=
"ppp"
,
.
name
=
"ppp"
,
.
open
=
ppp_asynctty_open
,
.
open
=
ppp_asynctty_open
,
...
...
net/core/flow.c
View file @
13cb21df
...
@@ -388,10 +388,13 @@ static int __init flow_cache_init(void)
...
@@ -388,10 +388,13 @@ static int __init flow_cache_init(void)
add_timer
(
&
flow_hash_rnd_timer
);
add_timer
(
&
flow_hash_rnd_timer
);
register_cpu_notifier
(
&
flow_cache_cpu_nb
);
register_cpu_notifier
(
&
flow_cache_cpu_nb
);
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
if
(
cpu_online
(
i
))
{
if
(
!
cpu_online
(
i
))
flow_cache_cpu_prepare
(
i
);
continue
;
flow_cache_cpu_online
(
i
);
if
(
flow_cache_cpu_prepare
(
i
)
==
NOTIFY_OK
&&
flow_cache_cpu_online
(
i
)
==
NOTIFY_OK
)
continue
;
panic
(
"NET: failed to initialise flow cache hash table
\n
"
);
}
}
return
0
;
return
0
;
...
...
net/ipv4/arp.c
View file @
13cb21df
...
@@ -623,15 +623,20 @@ int arp_process(struct sk_buff *skb)
...
@@ -623,15 +623,20 @@ int arp_process(struct sk_buff *skb)
int
addr_type
;
int
addr_type
;
struct
neighbour
*
n
;
struct
neighbour
*
n
;
/* arp_rcv below verifies the ARP header
,
verifies the device
/* arp_rcv below verifies the ARP header
and
verifies the device
* is ARP'able
, and linearizes the SKB (if needed)
.
* is ARP'able.
*/
*/
if
(
in_dev
==
NULL
)
if
(
in_dev
==
NULL
)
goto
out
;
goto
out
;
/* ARP header, plus 2 device addresses, plus 2 IP addresses. */
if
(
!
pskb_may_pull
(
skb
,
(
sizeof
(
struct
arphdr
)
+
(
2
*
dev
->
addr_len
)
+
(
2
*
sizeof
(
u32
)))))
goto
out
;
arp
=
skb
->
nh
.
arph
;
arp
=
skb
->
nh
.
arph
;
arp_ptr
=
(
unsigned
char
*
)(
arp
+
1
);
switch
(
dev_type
)
{
switch
(
dev_type
)
{
default:
default:
...
@@ -693,6 +698,7 @@ int arp_process(struct sk_buff *skb)
...
@@ -693,6 +698,7 @@ int arp_process(struct sk_buff *skb)
/*
/*
* Extract fields
* Extract fields
*/
*/
arp_ptr
=
(
unsigned
char
*
)(
arp
+
1
);
sha
=
arp_ptr
;
sha
=
arp_ptr
;
arp_ptr
+=
dev
->
addr_len
;
arp_ptr
+=
dev
->
addr_len
;
memcpy
(
&
sip
,
arp_ptr
,
4
);
memcpy
(
&
sip
,
arp_ptr
,
4
);
...
@@ -841,11 +847,6 @@ int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
...
@@ -841,11 +847,6 @@ int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
if
((
skb
=
skb_share_check
(
skb
,
GFP_ATOMIC
))
==
NULL
)
if
((
skb
=
skb_share_check
(
skb
,
GFP_ATOMIC
))
==
NULL
)
goto
out_of_mem
;
goto
out_of_mem
;
if
(
skb_is_nonlinear
(
skb
))
{
if
(
skb_linearize
(
skb
,
GFP_ATOMIC
)
!=
0
)
goto
freeskb
;
}
return
NF_HOOK
(
NF_ARP
,
NF_ARP_IN
,
skb
,
dev
,
NULL
,
arp_process
);
return
NF_HOOK
(
NF_ARP
,
NF_ARP_IN
,
skb
,
dev
,
NULL
,
arp_process
);
freeskb:
freeskb:
...
...
net/ipv4/netfilter/arp_tables.c
View file @
13cb21df
...
@@ -247,14 +247,16 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
...
@@ -247,14 +247,16 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
{
{
static
const
char
nulldevname
[
IFNAMSIZ
]
=
{
0
};
static
const
char
nulldevname
[
IFNAMSIZ
]
=
{
0
};
unsigned
int
verdict
=
NF_DROP
;
unsigned
int
verdict
=
NF_DROP
;
struct
arphdr
*
arp
=
(
*
pskb
)
->
nh
.
arph
;
struct
arphdr
*
arp
;
int
hotdrop
=
0
;
int
hotdrop
=
0
;
struct
arpt_entry
*
e
,
*
back
;
struct
arpt_entry
*
e
,
*
back
;
const
char
*
indev
,
*
outdev
;
const
char
*
indev
,
*
outdev
;
void
*
table_base
;
void
*
table_base
;
/* FIXME: Push down to extensions --RR */
/* ARP header, plus 2 device addresses, plus 2 IP addresses. */
if
(
skb_is_nonlinear
(
*
pskb
)
&&
skb_linearize
(
*
pskb
,
GFP_ATOMIC
)
!=
0
)
if
(
!
pskb_may_pull
((
*
pskb
),
(
sizeof
(
struct
arphdr
)
+
(
2
*
(
*
pskb
)
->
dev
->
addr_len
)
+
(
2
*
sizeof
(
u32
)))))
return
NF_DROP
;
return
NF_DROP
;
indev
=
in
?
in
->
name
:
nulldevname
;
indev
=
in
?
in
->
name
:
nulldevname
;
...
@@ -267,6 +269,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
...
@@ -267,6 +269,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
e
=
get_entry
(
table_base
,
table
->
private
->
hook_entry
[
hook
]);
e
=
get_entry
(
table_base
,
table
->
private
->
hook_entry
[
hook
]);
back
=
get_entry
(
table_base
,
table
->
private
->
underflow
[
hook
]);
back
=
get_entry
(
table_base
,
table
->
private
->
underflow
[
hook
]);
arp
=
(
*
pskb
)
->
nh
.
arph
;
do
{
do
{
if
(
arp_packet_match
(
arp
,
(
*
pskb
)
->
dev
,
indev
,
outdev
,
&
e
->
arp
))
{
if
(
arp_packet_match
(
arp
,
(
*
pskb
)
->
dev
,
indev
,
outdev
,
&
e
->
arp
))
{
struct
arpt_entry_target
*
t
;
struct
arpt_entry_target
*
t
;
...
...
net/ipv6/icmp.c
View file @
13cb21df
...
@@ -613,12 +613,6 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
...
@@ -613,12 +613,6 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
case
NDISC_NEIGHBOUR_SOLICITATION
:
case
NDISC_NEIGHBOUR_SOLICITATION
:
case
NDISC_NEIGHBOUR_ADVERTISEMENT
:
case
NDISC_NEIGHBOUR_ADVERTISEMENT
:
case
NDISC_REDIRECT
:
case
NDISC_REDIRECT
:
if
(
skb_is_nonlinear
(
skb
)
&&
skb_linearize
(
skb
,
GFP_ATOMIC
)
!=
0
)
{
kfree_skb
(
skb
);
return
0
;
}
ndisc_rcv
(
skb
);
ndisc_rcv
(
skb
);
break
;
break
;
...
...
net/ipv6/ndisc.c
View file @
13cb21df
...
@@ -714,12 +714,6 @@ void ndisc_recv_ns(struct sk_buff *skb)
...
@@ -714,12 +714,6 @@ void ndisc_recv_ns(struct sk_buff *skb)
struct
inet6_ifaddr
*
ifp
;
struct
inet6_ifaddr
*
ifp
;
struct
neighbour
*
neigh
;
struct
neighbour
*
neigh
;
if
(
skb
->
len
<
sizeof
(
struct
nd_msg
))
{
if
(
net_ratelimit
())
printk
(
KERN_WARNING
"ICMP NS: packet too short
\n
"
);
return
;
}
if
(
ipv6_addr_type
(
&
msg
->
target
)
&
IPV6_ADDR_MULTICAST
)
{
if
(
ipv6_addr_type
(
&
msg
->
target
)
&
IPV6_ADDR_MULTICAST
)
{
if
(
net_ratelimit
())
if
(
net_ratelimit
())
printk
(
KERN_WARNING
"ICMP NS: target address is multicast
\n
"
);
printk
(
KERN_WARNING
"ICMP NS: target address is multicast
\n
"
);
...
@@ -1410,7 +1404,12 @@ static void pndisc_redo(struct sk_buff *skb)
...
@@ -1410,7 +1404,12 @@ static void pndisc_redo(struct sk_buff *skb)
int
ndisc_rcv
(
struct
sk_buff
*
skb
)
int
ndisc_rcv
(
struct
sk_buff
*
skb
)
{
{
struct
nd_msg
*
msg
=
(
struct
nd_msg
*
)
skb
->
h
.
raw
;
struct
nd_msg
*
msg
;
if
(
!
pskb_may_pull
(
skb
,
skb
->
len
))
return
0
;
msg
=
(
struct
nd_msg
*
)
skb
->
h
.
raw
;
__skb_push
(
skb
,
skb
->
data
-
skb
->
h
.
raw
);
__skb_push
(
skb
,
skb
->
data
-
skb
->
h
.
raw
);
...
...
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