diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-21 08:44:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-21 08:44:08 -0700 |
commit | a19214430d27a3af6f1672ec26f3c893ef899ede (patch) | |
tree | ecd998eaf216f6e195c65cb050f4335db86b26f6 /include/net/ipv6.h | |
parent | b732d9680b7a2968823851f1163507ad9c45c8cb (diff) | |
parent | b9f75f45a6b46a0ab4eb0857d437a0845871f314 (diff) | |
download | blackbird-op-linux-a19214430d27a3af6f1672ec26f3c893ef899ede.tar.gz blackbird-op-linux-a19214430d27a3af6f1672ec26f3c893ef899ede.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
netns: Don't receive new packets in a dead network namespace.
sctp: Make sure N * sizeof(union sctp_addr) does not overflow.
pppoe: warning fix
ipv6: Drop packets for loopback address from outside of the box.
ipv6: Remove options header when setsockopt's optlen is 0
mac80211: detect driver tx bugs
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r-- | include/net/ipv6.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index e0a612bc9c4e..f422f7218e1c 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -367,6 +367,12 @@ static inline int ipv6_addr_any(const struct in6_addr *a) a->s6_addr32[2] | a->s6_addr32[3] ) == 0); } +static inline int ipv6_addr_loopback(const struct in6_addr *a) +{ + return ((a->s6_addr32[0] | a->s6_addr32[1] | + a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0); +} + static inline int ipv6_addr_v4mapped(const struct in6_addr *a) { return ((a->s6_addr32[0] | a->s6_addr32[1] | |