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
49ac163b
Commit
49ac163b
authored
Oct 15, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge nuts.ninka.net:/disk1/davem/BK/network-2.5
into nuts.ninka.net:/disk1/davem/BK/net-2.5
parents
01d259fe
57bcaf82
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
21 deletions
+41
-21
include/linux/netdevice.h
include/linux/netdevice.h
+5
-1
net/bridge/netfilter/ebt_among.c
net/bridge/netfilter/ebt_among.c
+1
-1
net/core/dev.c
net/core/dev.c
+4
-3
net/ipv4/ip_gre.c
net/ipv4/ip_gre.c
+4
-0
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+1
-1
net/ipv4/ipip.c
net/ipv4/ipip.c
+3
-0
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_ipv4.c
+17
-15
net/ipv6/ip6_tunnel.c
net/ipv6/ip6_tunnel.c
+3
-0
net/ipv6/sit.c
net/ipv6/sit.c
+3
-0
No files found.
include/linux/netdevice.h
View file @
49ac163b
...
@@ -511,7 +511,11 @@ extern struct net_device *__dev_get_by_flags(unsigned short flags,
...
@@ -511,7 +511,11 @@ extern struct net_device *__dev_get_by_flags(unsigned short flags,
unsigned
short
mask
);
unsigned
short
mask
);
extern
struct
net_device
*
dev_get_by_name
(
const
char
*
name
);
extern
struct
net_device
*
dev_get_by_name
(
const
char
*
name
);
extern
struct
net_device
*
__dev_get_by_name
(
const
char
*
name
);
extern
struct
net_device
*
__dev_get_by_name
(
const
char
*
name
);
extern
struct
net_device
*
dev_alloc
(
const
char
*
name
,
int
*
err
);
extern
struct
net_device
*
__dev_alloc
(
const
char
*
name
,
int
*
err
);
static
inline
__deprecated
struct
net_device
*
dev_alloc
(
const
char
*
name
,
int
*
err
)
{
return
__dev_alloc
(
name
,
err
);
}
extern
int
dev_alloc_name
(
struct
net_device
*
dev
,
const
char
*
name
);
extern
int
dev_alloc_name
(
struct
net_device
*
dev
,
const
char
*
name
);
extern
int
dev_open
(
struct
net_device
*
dev
);
extern
int
dev_open
(
struct
net_device
*
dev
);
extern
int
dev_close
(
struct
net_device
*
dev
);
extern
int
dev_close
(
struct
net_device
*
dev
);
...
...
net/bridge/netfilter/ebt_among.c
View file @
49ac163b
...
@@ -175,7 +175,7 @@ static int ebt_among_check(const char *tablename, unsigned int hookmask,
...
@@ -175,7 +175,7 @@ static int ebt_among_check(const char *tablename, unsigned int hookmask,
if
(
datalen
!=
EBT_ALIGN
(
expected_length
))
{
if
(
datalen
!=
EBT_ALIGN
(
expected_length
))
{
printk
(
KERN_WARNING
printk
(
KERN_WARNING
"ebtables: among: wrong size: %d"
"ebtables: among: wrong size: %d"
"against expected %d, rounded to %d
\n
"
,
"against expected %d, rounded to %
Z
d
\n
"
,
datalen
,
expected_length
,
datalen
,
expected_length
,
EBT_ALIGN
(
expected_length
));
EBT_ALIGN
(
expected_length
));
return
-
EINVAL
;
return
-
EINVAL
;
...
...
net/core/dev.c
View file @
49ac163b
...
@@ -646,11 +646,12 @@ int dev_alloc_name(struct net_device *dev, const char *name)
...
@@ -646,11 +646,12 @@ int dev_alloc_name(struct net_device *dev, const char *name)
* failed. The cause of an error is returned as a negative errno code
* failed. The cause of an error is returned as a negative errno code
* in the variable @err points to.
* in the variable @err points to.
*
*
* The caller must hold the @dev_base or RTNL locks when doing this in
* This call is deprecated in favor of alloc_netdev because
* the caller must hold the @dev_base or RTNL locks when doing this in
* order to avoid duplicate name allocations.
* order to avoid duplicate name allocations.
*/
*/
struct
net_device
*
dev_alloc
(
const
char
*
name
,
int
*
err
)
struct
net_device
*
__
dev_alloc
(
const
char
*
name
,
int
*
err
)
{
{
struct
net_device
*
dev
=
kmalloc
(
sizeof
(
*
dev
),
GFP_KERNEL
);
struct
net_device
*
dev
=
kmalloc
(
sizeof
(
*
dev
),
GFP_KERNEL
);
...
@@ -2997,7 +2998,7 @@ EXPORT_SYMBOL(__dev_remove_pack);
...
@@ -2997,7 +2998,7 @@ EXPORT_SYMBOL(__dev_remove_pack);
EXPORT_SYMBOL
(
__skb_linearize
);
EXPORT_SYMBOL
(
__skb_linearize
);
EXPORT_SYMBOL
(
call_netdevice_notifiers
);
EXPORT_SYMBOL
(
call_netdevice_notifiers
);
EXPORT_SYMBOL
(
dev_add_pack
);
EXPORT_SYMBOL
(
dev_add_pack
);
EXPORT_SYMBOL
(
dev_alloc
);
EXPORT_SYMBOL
(
__
dev_alloc
);
EXPORT_SYMBOL
(
dev_alloc_name
);
EXPORT_SYMBOL
(
dev_alloc_name
);
EXPORT_SYMBOL
(
dev_close
);
EXPORT_SYMBOL
(
dev_close
);
EXPORT_SYMBOL
(
dev_get_by_flags
);
EXPORT_SYMBOL
(
dev_get_by_flags
);
...
...
net/ipv4/ip_gre.c
View file @
49ac163b
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include <net/arp.h>
#include <net/arp.h>
#include <net/checksum.h>
#include <net/checksum.h>
#include <net/inet_ecn.h>
#include <net/inet_ecn.h>
#include <net/xfrm.h>
#ifdef CONFIG_IPV6
#ifdef CONFIG_IPV6
#include <net/ipv6.h>
#include <net/ipv6.h>
...
@@ -600,6 +601,9 @@ int ipgre_rcv(struct sk_buff *skb)
...
@@ -600,6 +601,9 @@ int ipgre_rcv(struct sk_buff *skb)
read_lock
(
&
ipgre_lock
);
read_lock
(
&
ipgre_lock
);
if
((
tunnel
=
ipgre_tunnel_lookup
(
iph
->
saddr
,
iph
->
daddr
,
key
))
!=
NULL
)
{
if
((
tunnel
=
ipgre_tunnel_lookup
(
iph
->
saddr
,
iph
->
daddr
,
key
))
!=
NULL
)
{
secpath_put
(
skb
->
sp
);
skb
->
sp
=
NULL
;
skb
->
mac
.
raw
=
skb
->
nh
.
raw
;
skb
->
mac
.
raw
=
skb
->
nh
.
raw
;
skb
->
nh
.
raw
=
__pskb_pull
(
skb
,
offset
);
skb
->
nh
.
raw
=
__pskb_pull
(
skb
,
offset
);
memset
(
&
(
IPCB
(
skb
)
->
opt
),
0
,
sizeof
(
struct
ip_options
));
memset
(
&
(
IPCB
(
skb
)
->
opt
),
0
,
sizeof
(
struct
ip_options
));
...
...
net/ipv4/ip_output.c
View file @
49ac163b
...
@@ -493,7 +493,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
...
@@ -493,7 +493,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
goto
slow_path
;
goto
slow_path
;
/* Correct socket ownership. */
/* Correct socket ownership. */
if
(
frag
->
sk
==
NULL
)
if
(
frag
->
sk
==
NULL
&&
skb
->
sk
)
goto
slow_path
;
goto
slow_path
;
/* Partially cloned skb? */
/* Partially cloned skb? */
...
...
net/ipv4/ipip.c
View file @
49ac163b
...
@@ -483,6 +483,9 @@ static int ipip_rcv(struct sk_buff *skb)
...
@@ -483,6 +483,9 @@ static int ipip_rcv(struct sk_buff *skb)
return
0
;
return
0
;
}
}
secpath_put
(
skb
->
sp
);
skb
->
sp
=
NULL
;
skb
->
mac
.
raw
=
skb
->
nh
.
raw
;
skb
->
mac
.
raw
=
skb
->
nh
.
raw
;
skb
->
nh
.
raw
=
skb
->
data
;
skb
->
nh
.
raw
=
skb
->
data
;
memset
(
&
(
IPCB
(
skb
)
->
opt
),
0
,
sizeof
(
struct
ip_options
));
memset
(
&
(
IPCB
(
skb
)
->
opt
),
0
,
sizeof
(
struct
ip_options
));
...
...
net/ipv4/tcp_ipv4.c
View file @
49ac163b
...
@@ -2145,7 +2145,6 @@ static void *listening_get_first(struct seq_file *seq)
...
@@ -2145,7 +2145,6 @@ static void *listening_get_first(struct seq_file *seq)
if
(
!
sk
)
if
(
!
sk
)
continue
;
continue
;
++
st
->
num
;
if
(
sk
->
sk_family
==
st
->
family
)
{
if
(
sk
->
sk_family
==
st
->
family
)
{
rc
=
sk
;
rc
=
sk
;
goto
out
;
goto
out
;
...
@@ -2159,7 +2158,7 @@ static void *listening_get_first(struct seq_file *seq)
...
@@ -2159,7 +2158,7 @@ static void *listening_get_first(struct seq_file *seq)
for
(
st
->
sbucket
=
0
;
st
->
sbucket
<
TCP_SYNQ_HSIZE
;
for
(
st
->
sbucket
=
0
;
st
->
sbucket
<
TCP_SYNQ_HSIZE
;
++
st
->
sbucket
)
{
++
st
->
sbucket
)
{
for
(
req
=
tp
->
listen_opt
->
syn_table
[
st
->
sbucket
];
for
(
req
=
tp
->
listen_opt
->
syn_table
[
st
->
sbucket
];
req
;
req
=
req
->
dl_next
,
++
st
->
num
)
{
req
;
req
=
req
->
dl_next
)
{
if
(
req
->
class
->
family
!=
st
->
family
)
if
(
req
->
class
->
family
!=
st
->
family
)
continue
;
continue
;
rc
=
req
;
rc
=
req
;
...
@@ -2181,6 +2180,8 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
...
@@ -2181,6 +2180,8 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
struct
sock
*
sk
=
cur
;
struct
sock
*
sk
=
cur
;
struct
tcp_iter_state
*
st
=
seq
->
private
;
struct
tcp_iter_state
*
st
=
seq
->
private
;
++
st
->
num
;
if
(
st
->
state
==
TCP_SEQ_STATE_OPENREQ
)
{
if
(
st
->
state
==
TCP_SEQ_STATE_OPENREQ
)
{
struct
open_request
*
req
=
cur
;
struct
open_request
*
req
=
cur
;
...
@@ -2188,7 +2189,6 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
...
@@ -2188,7 +2189,6 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
req
=
req
->
dl_next
;
req
=
req
->
dl_next
;
while
(
1
)
{
while
(
1
)
{
while
(
req
)
{
while
(
req
)
{
++
st
->
num
;
if
(
req
->
class
->
family
==
st
->
family
)
{
if
(
req
->
class
->
family
==
st
->
family
)
{
cur
=
req
;
cur
=
req
;
goto
out
;
goto
out
;
...
@@ -2235,10 +2235,11 @@ static void *listening_get_idx(struct seq_file *seq, loff_t *pos)
...
@@ -2235,10 +2235,11 @@ static void *listening_get_idx(struct seq_file *seq, loff_t *pos)
{
{
void
*
rc
=
listening_get_first
(
seq
);
void
*
rc
=
listening_get_first
(
seq
);
if
(
rc
)
while
(
rc
&&
*
pos
)
{
while
(
*
pos
&&
(
rc
=
listening_get_next
(
seq
,
rc
)))
rc
=
listening_get_next
(
seq
,
rc
);
--*
pos
;
--*
pos
;
return
*
pos
?
NULL
:
rc
;
}
return
rc
;
}
}
static
void
*
established_get_first
(
struct
seq_file
*
seq
)
static
void
*
established_get_first
(
struct
seq_file
*
seq
)
...
@@ -2254,7 +2255,6 @@ static void *established_get_first(struct seq_file *seq)
...
@@ -2254,7 +2255,6 @@ static void *established_get_first(struct seq_file *seq)
read_lock
(
&
tcp_ehash
[
st
->
bucket
].
lock
);
read_lock
(
&
tcp_ehash
[
st
->
bucket
].
lock
);
sk_for_each
(
sk
,
node
,
&
tcp_ehash
[
st
->
bucket
].
chain
)
{
sk_for_each
(
sk
,
node
,
&
tcp_ehash
[
st
->
bucket
].
chain
)
{
if
(
sk
->
sk_family
!=
st
->
family
)
{
if
(
sk
->
sk_family
!=
st
->
family
)
{
++
st
->
num
;
continue
;
continue
;
}
}
rc
=
sk
;
rc
=
sk
;
...
@@ -2264,7 +2264,6 @@ static void *established_get_first(struct seq_file *seq)
...
@@ -2264,7 +2264,6 @@ static void *established_get_first(struct seq_file *seq)
tw_for_each
(
tw
,
node
,
tw_for_each
(
tw
,
node
,
&
tcp_ehash
[
st
->
bucket
+
tcp_ehash_size
].
chain
)
{
&
tcp_ehash
[
st
->
bucket
+
tcp_ehash_size
].
chain
)
{
if
(
tw
->
tw_family
!=
st
->
family
)
{
if
(
tw
->
tw_family
!=
st
->
family
)
{
++
st
->
num
;
continue
;
continue
;
}
}
rc
=
tw
;
rc
=
tw
;
...
@@ -2284,12 +2283,13 @@ static void *established_get_next(struct seq_file *seq, void *cur)
...
@@ -2284,12 +2283,13 @@ static void *established_get_next(struct seq_file *seq, void *cur)
struct
hlist_node
*
node
;
struct
hlist_node
*
node
;
struct
tcp_iter_state
*
st
=
seq
->
private
;
struct
tcp_iter_state
*
st
=
seq
->
private
;
++
st
->
num
;
if
(
st
->
state
==
TCP_SEQ_STATE_TIME_WAIT
)
{
if
(
st
->
state
==
TCP_SEQ_STATE_TIME_WAIT
)
{
tw
=
cur
;
tw
=
cur
;
tw
=
tw_next
(
tw
);
tw
=
tw_next
(
tw
);
get_tw:
get_tw:
while
(
tw
&&
tw
->
tw_family
!=
st
->
family
)
{
while
(
tw
&&
tw
->
tw_family
!=
st
->
family
)
{
++
st
->
num
;
tw
=
tw_next
(
tw
);
tw
=
tw_next
(
tw
);
}
}
if
(
tw
)
{
if
(
tw
)
{
...
@@ -2311,7 +2311,6 @@ static void *established_get_next(struct seq_file *seq, void *cur)
...
@@ -2311,7 +2311,6 @@ static void *established_get_next(struct seq_file *seq, void *cur)
sk_for_each_from
(
sk
,
node
)
{
sk_for_each_from
(
sk
,
node
)
{
if
(
sk
->
sk_family
==
st
->
family
)
if
(
sk
->
sk_family
==
st
->
family
)
goto
found
;
goto
found
;
++
st
->
num
;
}
}
st
->
state
=
TCP_SEQ_STATE_TIME_WAIT
;
st
->
state
=
TCP_SEQ_STATE_TIME_WAIT
;
...
@@ -2327,10 +2326,11 @@ static void *established_get_idx(struct seq_file *seq, loff_t pos)
...
@@ -2327,10 +2326,11 @@ static void *established_get_idx(struct seq_file *seq, loff_t pos)
{
{
void
*
rc
=
established_get_first
(
seq
);
void
*
rc
=
established_get_first
(
seq
);
if
(
rc
)
while
(
rc
&&
pos
)
{
while
(
pos
&&
(
rc
=
established_get_next
(
seq
,
rc
)))
rc
=
established_get_next
(
seq
,
rc
);
--
pos
;
--
pos
;
return
pos
?
NULL
:
rc
;
}
return
rc
;
}
}
static
void
*
tcp_get_idx
(
struct
seq_file
*
seq
,
loff_t
pos
)
static
void
*
tcp_get_idx
(
struct
seq_file
*
seq
,
loff_t
pos
)
...
@@ -2354,6 +2354,8 @@ static void *tcp_get_idx(struct seq_file *seq, loff_t pos)
...
@@ -2354,6 +2354,8 @@ static void *tcp_get_idx(struct seq_file *seq, loff_t pos)
static
void
*
tcp_seq_start
(
struct
seq_file
*
seq
,
loff_t
*
pos
)
static
void
*
tcp_seq_start
(
struct
seq_file
*
seq
,
loff_t
*
pos
)
{
{
struct
tcp_iter_state
*
st
=
seq
->
private
;
st
->
num
=
0
;
return
*
pos
?
tcp_get_idx
(
seq
,
*
pos
-
1
)
:
SEQ_START_TOKEN
;
return
*
pos
?
tcp_get_idx
(
seq
,
*
pos
-
1
)
:
SEQ_START_TOKEN
;
}
}
...
...
net/ipv6/ip6_tunnel.c
View file @
49ac163b
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#include <net/ip6_route.h>
#include <net/ip6_route.h>
#include <net/addrconf.h>
#include <net/addrconf.h>
#include <net/ip6_tunnel.h>
#include <net/ip6_tunnel.h>
#include <net/xfrm.h>
MODULE_AUTHOR
(
"Ville Nuorvala"
);
MODULE_AUTHOR
(
"Ville Nuorvala"
);
MODULE_DESCRIPTION
(
"IPv6-in-IPv6 tunnel"
);
MODULE_DESCRIPTION
(
"IPv6-in-IPv6 tunnel"
);
...
@@ -514,6 +515,8 @@ int ip6ip6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
...
@@ -514,6 +515,8 @@ int ip6ip6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
read_unlock
(
&
ip6ip6_lock
);
read_unlock
(
&
ip6ip6_lock
);
goto
discard
;
goto
discard
;
}
}
secpath_put
(
skb
->
sp
);
skb
->
sp
=
NULL
;
skb
->
mac
.
raw
=
skb
->
nh
.
raw
;
skb
->
mac
.
raw
=
skb
->
nh
.
raw
;
skb
->
nh
.
raw
=
skb
->
data
;
skb
->
nh
.
raw
=
skb
->
data
;
skb
->
protocol
=
htons
(
ETH_P_IPV6
);
skb
->
protocol
=
htons
(
ETH_P_IPV6
);
...
...
net/ipv6/sit.c
View file @
49ac163b
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
#include <net/icmp.h>
#include <net/icmp.h>
#include <net/ipip.h>
#include <net/ipip.h>
#include <net/inet_ecn.h>
#include <net/inet_ecn.h>
#include <net/xfrm.h>
/*
/*
This version of net/ipv6/sit.c is cloned of net/ipv4/ip_gre.c
This version of net/ipv6/sit.c is cloned of net/ipv4/ip_gre.c
...
@@ -376,6 +377,8 @@ static int ipip6_rcv(struct sk_buff *skb)
...
@@ -376,6 +377,8 @@ static int ipip6_rcv(struct sk_buff *skb)
read_lock
(
&
ipip6_lock
);
read_lock
(
&
ipip6_lock
);
if
((
tunnel
=
ipip6_tunnel_lookup
(
iph
->
saddr
,
iph
->
daddr
))
!=
NULL
)
{
if
((
tunnel
=
ipip6_tunnel_lookup
(
iph
->
saddr
,
iph
->
daddr
))
!=
NULL
)
{
secpath_put
(
skb
->
sp
);
skb
->
sp
=
NULL
;
skb
->
mac
.
raw
=
skb
->
nh
.
raw
;
skb
->
mac
.
raw
=
skb
->
nh
.
raw
;
skb
->
nh
.
raw
=
skb
->
data
;
skb
->
nh
.
raw
=
skb
->
data
;
memset
(
&
(
IPCB
(
skb
)
->
opt
),
0
,
sizeof
(
struct
ip_options
));
memset
(
&
(
IPCB
(
skb
)
->
opt
),
0
,
sizeof
(
struct
ip_options
));
...
...
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