diff options
author | Tony Luck <tony.luck@intel.com> | 2005-06-21 19:21:20 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-06-21 19:21:20 -0400 |
commit | 29516d75a0b09e0a0328dd55c98a342515c9615a (patch) | |
tree | 4b03326311958ad6de82653a1caf289ad8c38538 /net/ipv4/xfrm4_output.c | |
parent | 4ea78729b8dbfc400fe165a57b90a394a7275a54 (diff) | |
parent | 4a4f8fdba6f5a34ca90f426021e17491a30202da (diff) |
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'net/ipv4/xfrm4_output.c')
-rw-r--r-- | net/ipv4/xfrm4_output.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c index af2392ae5769..66620a95942a 100644 --- a/net/ipv4/xfrm4_output.c +++ b/net/ipv4/xfrm4_output.c | |||
@@ -33,6 +33,7 @@ static void xfrm4_encap(struct sk_buff *skb) | |||
33 | struct dst_entry *dst = skb->dst; | 33 | struct dst_entry *dst = skb->dst; |
34 | struct xfrm_state *x = dst->xfrm; | 34 | struct xfrm_state *x = dst->xfrm; |
35 | struct iphdr *iph, *top_iph; | 35 | struct iphdr *iph, *top_iph; |
36 | int flags; | ||
36 | 37 | ||
37 | iph = skb->nh.iph; | 38 | iph = skb->nh.iph; |
38 | skb->h.ipiph = iph; | 39 | skb->h.ipiph = iph; |
@@ -51,10 +52,13 @@ static void xfrm4_encap(struct sk_buff *skb) | |||
51 | 52 | ||
52 | /* DS disclosed */ | 53 | /* DS disclosed */ |
53 | top_iph->tos = INET_ECN_encapsulate(iph->tos, iph->tos); | 54 | top_iph->tos = INET_ECN_encapsulate(iph->tos, iph->tos); |
54 | if (x->props.flags & XFRM_STATE_NOECN) | 55 | |
56 | flags = x->props.flags; | ||
57 | if (flags & XFRM_STATE_NOECN) | ||
55 | IP_ECN_clear(top_iph); | 58 | IP_ECN_clear(top_iph); |
56 | 59 | ||
57 | top_iph->frag_off = iph->frag_off & htons(IP_DF); | 60 | top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ? |
61 | 0 : (iph->frag_off & htons(IP_DF)); | ||
58 | if (!top_iph->frag_off) | 62 | if (!top_iph->frag_off) |
59 | __ip_select_ident(top_iph, dst, 0); | 63 | __ip_select_ident(top_iph, dst, 0); |
60 | 64 | ||