diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-12 20:09:36 -0300 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-25 22:25:08 -0700 |
commit | e023dd643798c4f06c16466af90b4d250e4b8bd7 (patch) | |
tree | 41b784e3e861afcab62a0375bba2a5d59f7a5470 | |
parent | c9bdd4b5257406b0608385d19c40b5511decf4f6 (diff) | |
download | linux-e023dd643798c4f06c16466af90b4d250e4b8bd7.tar.gz linux-e023dd643798c4f06c16466af90b4d250e4b8bd7.tar.bz2 linux-e023dd643798c4f06c16466af90b4d250e4b8bd7.zip |
[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>
-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={ static void ip_encap(struct sk_buff *skb, __be32 saddr, __be32 daddr) { struct iphdr *iph; + struct iphdr *old_iph = skb->nh.iph; skb_push(skb, sizeof(struct iphdr)); skb->h.ipiph = skb->nh.iph; @@ -1103,8 +1104,8 @@ static void ip_encap(struct sk_buff *skb, __be32 saddr, __be32 daddr) iph = skb->nh.iph; iph->version = 4; - iph->tos = skb->nh.iph->tos; - iph->ttl = skb->nh.iph->ttl; + iph->tos = old_iph->tos; + iph->ttl = old_iph->ttl; iph->frag_off = 0; iph->daddr = daddr; iph->saddr = saddr; |