diff options
| author | Hideaki Yoshifuji <yoshfuji@linux-ipv6.org> | 2004-09-29 05:25:48 +0900 |
|---|---|---|
| committer | Hideaki Yoshifuji <yoshfuji@linux-ipv6.org> | 2004-09-29 05:25:48 +0900 |
| commit | 89277f9856a059723fd25492db28557cf4e48dff (patch) | |
| tree | e485e2e1a4e4f64741c2d8a39f345e92710976db | |
| parent | beb0e5c2e16058dccf3f78f5cce0e54aa79dd20f (diff) | |
[IPV6] Fix routing header handling.
We need to rewind skb pointers when we forward a packet to other host
because dst_input() assumes that skb->data points head of ipv6 protocol header.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
| -rw-r--r-- | net/ipv6/exthdrs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 464a3f4d63e3..2b78c840c349 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -314,9 +314,11 @@ looped_back: dst_release(xchg(&skb->dst, NULL)); ip6_route_input(skb); if (skb->dst->error) { + skb_push(skb, skb->data - skb->nh.raw); dst_input(skb); return -1; } + if (skb->dst->dev->flags&IFF_LOOPBACK) { if (skb->nh.ipv6h->hop_limit <= 1) { IP6_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); @@ -329,6 +331,7 @@ looped_back: goto looped_back; } + skb_push(skb, skb->data - skb->nh.raw); dst_input(skb); return -1; } |
