diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-07-09 22:34:25 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-07-09 22:34:25 +0200 |
commit | f974a8ec96571535ee07880a023bcce0e3f2c76b (patch) | |
tree | 5cf09207b1ad292a55275cd0b24999fa29b9dfe8 /net/ipv6/ip6_input.c | |
parent | [ARM] 5143/1: pxa: further cleanup PXA Kconfig by removing one (diff) | |
parent | [ARM] mach-types update (diff) | |
download | linux-f974a8ec96571535ee07880a023bcce0e3f2c76b.tar.xz linux-f974a8ec96571535ee07880a023bcce0e3f2c76b.zip |
Merge branch 'machtypes' into pxa-palm
Diffstat (limited to 'net/ipv6/ip6_input.c')
-rw-r--r-- | net/ipv6/ip6_input.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 4e5c8615832c..17eb48b8e329 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c @@ -102,6 +102,15 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt if (hdr->version != 6) goto err; + /* + * RFC4291 2.5.3 + * A packet received on an interface with a destination address + * of loopback must be dropped. + */ + if (!(dev->flags & IFF_LOOPBACK) && + ipv6_addr_loopback(&hdr->daddr)) + goto err; + skb->transport_header = skb->network_header + sizeof(*hdr); IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); |