diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-04-07 16:45:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-07 16:45:40 -0400 |
commit | b37e3b6d64358604960b35e8ecbb7aed22e0926e (patch) | |
tree | f9673afc2332c15a989d3b32f002363a92ea66e1 /include/net/if_inet6.h | |
parent | a90c7a313a1c5b4fc99f987a2ae8f92ab0ae35c7 (diff) | |
parent | bd39a274fb7b43374c797bafdb7f506598f36f77 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
drivers/net/wireless/rtlwifi/efuse.c
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
net/bluetooth/mgmt.c
Diffstat (limited to 'include/net/if_inet6.h')
-rw-r--r-- | include/net/if_inet6.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index 04977eefb0ee..fccc2180c61b 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -286,5 +286,21 @@ static inline void ipv6_ib_mc_map(const struct in6_addr *addr, | |||
286 | buf[9] = broadcast[9]; | 286 | buf[9] = broadcast[9]; |
287 | memcpy(buf + 10, addr->s6_addr + 6, 10); | 287 | memcpy(buf + 10, addr->s6_addr + 6, 10); |
288 | } | 288 | } |
289 | |||
290 | static inline int ipv6_ipgre_mc_map(const struct in6_addr *addr, | ||
291 | const unsigned char *broadcast, char *buf) | ||
292 | { | ||
293 | if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) { | ||
294 | memcpy(buf, broadcast, 4); | ||
295 | } else { | ||
296 | /* v4mapped? */ | ||
297 | if ((addr->s6_addr32[0] | addr->s6_addr32[1] | | ||
298 | (addr->s6_addr32[2] ^ htonl(0x0000ffff))) != 0) | ||
299 | return -EINVAL; | ||
300 | memcpy(buf, &addr->s6_addr32[3], 4); | ||
301 | } | ||
302 | return 0; | ||
303 | } | ||
304 | |||
289 | #endif | 305 | #endif |
290 | #endif | 306 | #endif |