net: ipv6: allow choosing optimistic addresses with use_optimistic
authorErik Kline <ek@google.com>
Fri, 5 Dec 2014 10:45:10 +0000 (19:45 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Fri, 5 Dec 2014 12:41:18 +0000 (04:41 -0800)
commit0065bf4206cd4fecb482aef751fd39360fa8bafa
treecb16f88186210f19aa396d2123e5d66604a42f68
parent4b77eee35fd243fff8df79dc80b905e91fd0fa42
net: ipv6: allow choosing optimistic addresses with use_optimistic

The use_optimistic sysctl makes optimistic IPv6 addresses
equivalent to preferred addresses for source address selection
(e.g., when calling connect()), but it does not allow an
application to bind to optimistic addresses. This behaviour is
inconsistent - for example, it doesn't make sense for bind() to
an optimistic address fail with EADDRNOTAVAIL, but connect() to
choose that address outgoing address on the same socket.

Bug: 17769720
Bug: 18609055
Change-Id: I9de0d6c92ac45e29d28e318ac626c71806666f13
Signed-off-by: Erik Kline <ek@google.com>
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
net/ipv6/addrconf.c