diff options
author | Ingo Molnar | 2008-06-25 12:36:55 +0200 |
---|---|---|
committer | Ingo Molnar | 2008-06-25 12:36:55 +0200 |
commit | f6477cc76c73833a56e97f1fafc36a7ca92927e5 (patch) | |
tree | 9b4ca3d9fa63ea001d516834c8b2707094f3f711 /net/ipv6/ip6_input.c | |
parent | Merge branch 'linus' into x86/timers (diff) | |
parent | Linux 2.6.26-rc8 (diff) | |
download | kernel-qcow2-linux-f6477cc76c73833a56e97f1fafc36a7ca92927e5.tar.gz kernel-qcow2-linux-f6477cc76c73833a56e97f1fafc36a7ca92927e5.tar.xz kernel-qcow2-linux-f6477cc76c73833a56e97f1fafc36a7ca92927e5.zip |
Merge branch 'linus' into x86/timers
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); |