X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fipv4%2Fah4.c;h=8c16b71c3932ea1ebbbabebda31e2d348ec03e82;hb=7b563c525e46f373a521421e31aa791cc27beb56;hp=9784f03769808fe1d0ed4e0e93b3fd5ce518ac00;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index 9784f0376..8c16b71c3 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -72,9 +73,9 @@ static int ah_output(struct sk_buff **pskb) iph->tos = top_iph->tos; iph->ttl = top_iph->ttl; iph->frag_off = top_iph->frag_off; + iph->daddr = top_iph->daddr; if (top_iph->ihl != 5) { - iph->daddr = top_iph->daddr; memcpy(iph+1, top_iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); err = ip_clear_mutable_options(top_iph, &top_iph->daddr); if (err) @@ -103,10 +104,9 @@ static int ah_output(struct sk_buff **pskb) top_iph->tos = iph->tos; top_iph->ttl = iph->ttl; top_iph->frag_off = iph->frag_off; - if (top_iph->ihl != 5) { - top_iph->daddr = iph->daddr; + top_iph->daddr = iph->daddr; + if (top_iph->ihl != 5) memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); - } ip_send_check(top_iph);