summaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2020-03-27 23:00:19 +0100
committerDavid S. Miller <davem@davemloft.net>2020-03-30 07:30:57 +0200
commitf37c6059363403d528acf8d530bb6e8a5666a875 (patch)
treec4fe6a51693fc24c9619626f663709570b1bf4cf /include/net/addrconf.h
parentinclude: uapi: linux: add rpl sr header definition (diff)
downloadlinux-f37c6059363403d528acf8d530bb6e8a5666a875.tar.xz
linux-f37c6059363403d528acf8d530bb6e8a5666a875.zip
addrconf: add functionality to check on rpl requirements
This patch adds a functionality to addrconf to check on a specific RPL address configuration. According to RFC 6554: To detect loops in the SRH, a router MUST determine if the SRH includes multiple addresses assigned to any interface on that router. If such addresses appear more than once and are separated by at least one address not assigned to that router. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r--include/net/addrconf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index a088349dd94f..e0eabe58aa8b 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -90,6 +90,9 @@ int ipv6_chk_addr_and_flags(struct net *net, const struct in6_addr *addr,
int ipv6_chk_home_addr(struct net *net, const struct in6_addr *addr);
#endif
+int ipv6_chk_rpl_srh_loop(struct net *net, const struct in6_addr *segs,
+ unsigned char nsegs);
+
bool ipv6_chk_custom_prefix(const struct in6_addr *addr,
const unsigned int prefix_len,
struct net_device *dev);