netfilter: ipv6: add IPSKB_REROUTED exclusion to NF_HOOK/POSTROUTING invocation
[linux-2.6.git] / net / ipv6 / ip6_output.c
index 236ac78..c10a38a 100644 (file)
@@ -172,8 +172,9 @@ int ip6_output(struct sk_buff *skb)
                return 0;
        }
 
-       return NF_HOOK(NFPROTO_IPV6, NF_INET_POST_ROUTING, skb, NULL, dev,
-                      ip6_finish_output);
+       return NF_HOOK_COND(NFPROTO_IPV6, NF_INET_POST_ROUTING, skb, NULL, dev,
+                           ip6_finish_output,
+                           !(IP6CB(skb)->flags & IP6SKB_REROUTED));
 }
 
 /*