ipv6: sysctl to restrict candidate source addresses
Per RFC 6724, section 4, "Candidate Source Addresses":
It is RECOMMENDED that the candidate source addresses be the set
of unicast addresses assigned to the interface that will be used
to send to the destination (the "outgoing" interface).
Add a sysctl to enable this behaviour.
Signed-off-by: Erik Kline <ek@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 3985e8a3611a93bb36789f65db862e5700aab65e)
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index c1c2250..2343532 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -58,6 +58,7 @@
bool initialized;
struct in6_addr secret;
} stable_secret;
+ __s32 use_oif_addrs_only;
void *sysctl;
};