projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[XFRM] STATE: Add a hook to find offset to be inserted header in outbound.
[linux-2.6-block.git]
/
net
/
ipv6
/
xfrm6_output.c
diff --git
a/net/ipv6/xfrm6_output.c
b/net/ipv6/xfrm6_output.c
index 48fccb1eca08ad31eae996995600924e1f491537..b4628fbf8ff598013f484147286a98fbe62653ff 100644
(file)
--- a/
net/ipv6/xfrm6_output.c
+++ b/
net/ipv6/xfrm6_output.c
@@
-17,6
+17,12
@@
#include <net/ipv6.h>
#include <net/xfrm.h>
#include <net/ipv6.h>
#include <net/xfrm.h>
+int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb,
+ u8 **prevhdr)
+{
+ return ip6_find_1stfragopt(skb, prevhdr);
+}
+
static int xfrm6_tunnel_check_size(struct sk_buff *skb)
{
int mtu, ret = 0;
static int xfrm6_tunnel_check_size(struct sk_buff *skb)
{
int mtu, ret = 0;
@@
-41,13
+47,13
@@
static int xfrm6_output_one(struct sk_buff *skb)
struct xfrm_state *x = dst->xfrm;
int err;
struct xfrm_state *x = dst->xfrm;
int err;
- if (skb->ip_summed == CHECKSUM_
HW
) {
- err = skb_checksum_help(skb
, 0
);
+ if (skb->ip_summed == CHECKSUM_
PARTIAL
) {
+ err = skb_checksum_help(skb);
if (err)
goto error_nolock;
}
if (err)
goto error_nolock;
}
- if (x->props.mode) {
+ if (x->props.mode
== XFRM_MODE_TUNNEL
) {
err = xfrm6_tunnel_check_size(skb);
if (err)
goto error_nolock;
err = xfrm6_tunnel_check_size(skb);
if (err)
goto error_nolock;
@@
-80,7
+86,7
@@
static int xfrm6_output_one(struct sk_buff *skb)
}
dst = skb->dst;
x = dst->xfrm;
}
dst = skb->dst;
x = dst->xfrm;
- } while (x &&
!x->props.mode
);
+ } while (x &&
(x->props.mode != XFRM_MODE_TUNNEL)
);
IP6CB(skb)->flags |= IP6SKB_XFRM_TRANSFORMED;
err = 0;
IP6CB(skb)->flags |= IP6SKB_XFRM_TRANSFORMED;
err = 0;
@@
-122,10
+128,10
@@
static int xfrm6_output_finish(struct sk_buff *skb)
{
struct sk_buff *segs;
{
struct sk_buff *segs;
- if (!skb_
shinfo(skb)->gso_size
)
+ if (!skb_
is_gso(skb)
)
return xfrm6_output_finish2(skb);
return xfrm6_output_finish2(skb);
- skb->protocol = htons(ETH_P_IP);
+ skb->protocol = htons(ETH_P_IP
V6
);
segs = skb_gso_segment(skb, 0);
kfree_skb(skb);
if (unlikely(IS_ERR(segs)))
segs = skb_gso_segment(skb, 0);
kfree_skb(skb);
if (unlikely(IS_ERR(segs)))