ipv6: sysctl to restrict candidate source addresses
authorErik Kline <ek@google.com>
Wed, 22 Jul 2015 07:38:25 +0000 (16:38 +0900)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sat, 16 Apr 2016 21:37:02 +0000 (14:37 -0700)
commit104e5029c460a5b244dce74b1dc99aae10ad0f91
treee648ac3ead9d4295cf1f98091d590f538f0a389c
parent6d1580129cf71f7fd6fbc2cdf1724096eba8c181
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.

[Simplified back-port of net-next 3985e8a3611a93bb36789f65db862e5700aab65e]

Bug: 19470192
Bug: 21832279
Bug: 22464419
Change-Id: I404a53694f0df948389d33b0669be6203a1d2da5
Signed-off-by: Erik Kline <ek@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-on: http://git-master/r/1123593
GVS: Gerrit_Virtual_Submit
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
(cherry picked from commit 97e252a84c7d1c791196115ea4cf836a838cebd2)
Reviewed-on: http://git-master/r/1127379
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Documentation/networking/ip-sysctl.txt
include/linux/ipv6.h
include/uapi/linux/ipv6.h
net/ipv6/addrconf.c