ipv6: introdcue __ipv6_addr_needs_scope_id and ipv6_iface_scope_id helper functions
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Fri, 8 Mar 2013 02:07:16 +0000 (02:07 +0000)
committerGabby Lee <galee@nvidia.com>
Fri, 10 Jan 2014 01:50:50 +0000 (17:50 -0800)
commit36a0aecac360a89a88306d22b7578d2ae14ba9be
tree0f2160f61ede78e1165d7725b2e69353ea32edf1
parentf08b3a1c970f72c6978979936d117b694ecaeba6
ipv6: introdcue __ipv6_addr_needs_scope_id and ipv6_iface_scope_id helper functions

[net-next commit b7ef213ef65256168df83ddfbb8131ed9adc10f9]

__ipv6_addr_needs_scope_id checks if an ipv6 address needs to supply
a 'sin6_scope_id != 0'. 'sin6_scope_id != 0' was enforced in case
of link-local addresses. To support interface-local multicast these
checks had to be enhanced and are now consolidated into these new helper
functions.

v2:
a) migrated to struct ipv6_addr_props

v3:
a) reverted changes for ipv6_addr_props
b) test for address type instead of comparing scope

v4:
a) unchanged

Bug 1412141

Change-Id: I1788f1f2d3a6bd2b9e6a6afe74992d6d4a1385eb
Suggested-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2c75b248e5243d0af7cc97522148db7415a70f8a)
Reviewed-on: http://git-master/r/336266
(cherry picked from commit dfd23e75d7f69863ec3903ea1300185a1474b56a)
Reviewed-on: http://git-master/r/353229
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Gabby Lee <galee@nvidia.com>
include/net/ipv6.h