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
4123def9
Commit
4123def9
authored
May 21, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge davem@nuts.davemloft.net:/disk1/BK/net-2.6
into kernel.bkbits.net:/home/davem/net-2.6
parents
008fbe6b
a2db90b0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
25 deletions
+32
-25
include/linux/netdevice.h
include/linux/netdevice.h
+2
-0
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+1
-1
net/ipv4/ipip.c
net/ipv4/ipip.c
+1
-0
net/ipv6/raw.c
net/ipv6/raw.c
+22
-19
net/xfrm/xfrm_state.c
net/xfrm/xfrm_state.c
+6
-5
No files found.
include/linux/netdevice.h
View file @
4123def9
...
...
@@ -215,6 +215,8 @@ struct hh_cache
*/
#define LL_RESERVED_SPACE(dev) \
(((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
#define LL_RESERVED_SPACE_EXTRA(dev,extra) \
((((dev)->hard_header_len+extra)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
/* These flag bits are private to the generic network queueing
* layer, they may not be explicitly referenced by any other
...
...
net/ipv4/ip_output.c
View file @
4123def9
...
...
@@ -567,7 +567,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
#ifdef CONFIG_BRIDGE_NETFILTER
/* for bridged IP traffic encapsulated inside f.e. a vlan header,
* we need to make room for the encapsulating header */
ll_rs
=
LL_RESERVED_SPACE
(
rt
->
u
.
dst
.
dev
+
nf_bridge_pad
(
skb
));
ll_rs
=
LL_RESERVED_SPACE
_EXTRA
(
rt
->
u
.
dst
.
dev
,
nf_bridge_pad
(
skb
));
mtu
-=
nf_bridge_pad
(
skb
);
#else
ll_rs
=
LL_RESERVED_SPACE
(
rt
->
u
.
dst
.
dev
);
...
...
net/ipv4/ipip.c
View file @
4123def9
...
...
@@ -479,6 +479,7 @@ static int ipip_rcv(struct sk_buff *skb)
read_lock
(
&
ipip_lock
);
if
((
tunnel
=
ipip_tunnel_lookup
(
iph
->
saddr
,
iph
->
daddr
))
!=
NULL
)
{
if
(
!
xfrm4_policy_check
(
NULL
,
XFRM_POLICY_IN
,
skb
))
{
read_unlock
(
&
ipip_lock
);
kfree_skb
(
skb
);
return
0
;
}
...
...
net/ipv6/raw.c
View file @
4123def9
...
...
@@ -283,7 +283,8 @@ void rawv6_err(struct sock *sk, struct sk_buff *skb,
static
inline
int
rawv6_rcv_skb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
if
(
sk
->
sk_filter
&&
skb
->
ip_summed
!=
CHECKSUM_UNNECESSARY
)
{
if
((
raw6_sk
(
sk
)
->
checksum
||
sk
->
sk_filter
)
&&
skb
->
ip_summed
!=
CHECKSUM_UNNECESSARY
)
{
if
((
unsigned
short
)
csum_fold
(
skb_checksum
(
skb
,
0
,
skb
->
len
,
skb
->
csum
)))
{
/* FIXME: increment a raw6 drops counter here */
kfree_skb
(
skb
);
...
...
@@ -452,6 +453,10 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
struct
sk_buff
*
skb
;
int
err
=
0
;
u16
*
csum
;
u32
tmp_csum
;
if
(
!
opt
->
checksum
)
goto
send
;
if
((
skb
=
skb_peek
(
&
sk
->
sk_write_queue
))
==
NULL
)
goto
out
;
...
...
@@ -463,29 +468,32 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
goto
out
;
}
/* should be check HW csum miyazawa */
if
(
skb_queue_len
(
&
sk
->
sk_write_queue
)
==
1
)
{
/*
* Only one fragment on the socket.
*/
/* should be check HW csum miyazawa */
*
csum
=
csum_ipv6_magic
(
&
fl
->
fl6_src
,
&
fl
->
fl6_dst
,
len
,
fl
->
proto
,
skb
->
csum
);
tmp_csum
=
skb
->
csum
;
}
else
{
u32
tmp_csum
=
0
;
tmp_csum
=
0
;
skb_queue_walk
(
&
sk
->
sk_write_queue
,
skb
)
{
tmp_csum
=
csum_add
(
tmp_csum
,
skb
->
csum
);
}
tmp_csum
=
csum_ipv6_magic
(
&
fl
->
fl6_src
,
&
fl
->
fl6_dst
,
len
,
fl
->
proto
,
tmp_csum
);
*
csum
=
tmp_csum
;
}
/* in case cksum was not initialized */
if
(
unlikely
(
*
csum
))
tmp_csum
=
csum_sub
(
tmp_csum
,
*
csum
);
*
csum
=
csum_ipv6_magic
(
&
fl
->
fl6_src
,
&
fl
->
fl6_dst
,
len
,
fl
->
proto
,
tmp_csum
);
if
(
*
csum
==
0
)
*
csum
=
-
1
;
ip6_push_pending_frames
(
sk
);
send:
err
=
ip6_push_pending_frames
(
sk
);
out:
return
err
;
}
...
...
@@ -702,13 +710,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
if
(
err
)
ip6_flush_pending_frames
(
sk
);
else
if
(
!
(
msg
->
msg_flags
&
MSG_MORE
))
{
if
(
raw_opt
->
checksum
)
{
err
=
rawv6_push_pending_frames
(
sk
,
&
fl
,
raw_opt
,
len
);
}
else
{
err
=
ip6_push_pending_frames
(
sk
);
}
}
else
if
(
!
(
msg
->
msg_flags
&
MSG_MORE
))
err
=
rawv6_push_pending_frames
(
sk
,
&
fl
,
raw_opt
,
len
);
}
done:
ip6_dst_store
(
sk
,
dst
,
...
...
net/xfrm/xfrm_state.c
View file @
4123def9
...
...
@@ -489,15 +489,16 @@ int xfrm_state_update(struct xfrm_state *x)
memcpy
(
x1
->
encap
,
x
->
encap
,
sizeof
(
*
x1
->
encap
));
memcpy
(
&
x1
->
lft
,
&
x
->
lft
,
sizeof
(
x1
->
lft
));
x1
->
km
.
dying
=
0
;
if
(
!
mod_timer
(
&
x1
->
timer
,
jiffies
+
HZ
))
xfrm_state_hold
(
x1
);
if
(
x1
->
curlft
.
use_time
)
xfrm_state_check_expire
(
x1
);
err
=
0
;
}
spin_unlock_bh
(
&
x1
->
lock
);
if
(
!
mod_timer
(
&
x1
->
timer
,
jiffies
+
HZ
))
xfrm_state_hold
(
x1
);
if
(
x1
->
curlft
.
use_time
)
xfrm_state_check_expire
(
x1
);
xfrm_state_put
(
x1
);
return
err
;
...
...
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