diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-12 19:09:36 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:08 -0400 |
commit | e023dd643798c4f06c16466af90b4d250e4b8bd7 (patch) | |
tree | 41b784e3e861afcab62a0375bba2a5d59f7a5470 /net/ipv4/ipmr.c | |
parent | c9bdd4b5257406b0608385d19c40b5511decf4f6 (diff) |
[IPMR]: Fix bug introduced when converting to skb_network_reset_header
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r-- | net/ipv4/ipmr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 54b7543190f1..b24dffe3bd46 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1096,6 +1096,7 @@ static struct notifier_block ip_mr_notifier={ | |||
1096 | static void ip_encap(struct sk_buff *skb, __be32 saddr, __be32 daddr) | 1096 | static void ip_encap(struct sk_buff *skb, __be32 saddr, __be32 daddr) |
1097 | { | 1097 | { |
1098 | struct iphdr *iph; | 1098 | struct iphdr *iph; |
1099 | struct iphdr *old_iph = skb->nh.iph; | ||
1099 | 1100 | ||
1100 | skb_push(skb, sizeof(struct iphdr)); | 1101 | skb_push(skb, sizeof(struct iphdr)); |
1101 | skb->h.ipiph = skb->nh.iph; | 1102 | skb->h.ipiph = skb->nh.iph; |
@@ -1103,8 +1104,8 @@ static void ip_encap(struct sk_buff *skb, __be32 saddr, __be32 daddr) | |||
1103 | iph = skb->nh.iph; | 1104 | iph = skb->nh.iph; |
1104 | 1105 | ||
1105 | iph->version = 4; | 1106 | iph->version = 4; |
1106 | iph->tos = skb->nh.iph->tos; | 1107 | iph->tos = old_iph->tos; |
1107 | iph->ttl = skb->nh.iph->ttl; | 1108 | iph->ttl = old_iph->ttl; |
1108 | iph->frag_off = 0; | 1109 | iph->frag_off = 0; |
1109 | iph->daddr = daddr; | 1110 | iph->daddr = daddr; |
1110 | iph->saddr = saddr; | 1111 | iph->saddr = saddr; |