summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2014-03-26 19:35:41 +0900
committerSimon Wilson <simonwilson@google.com>2014-09-04 17:41:22 -0700
commit685921f1d655b68d2d66cf0a2bddedd4080cf2ef (patch)
tree99c71cdaf61528034fd16a097641c47cb51d6cbf /include/linux
parent6ef64c612a77dd88da25d06015d44a1c2173e4a9 (diff)
downloadolio-linux-3.10-685921f1d655b68d2d66cf0a2bddedd4080cf2ef.tar.xz
olio-linux-3.10-685921f1d655b68d2d66cf0a2bddedd4080cf2ef.zip
net: ipv6: autoconf routes into per-device tables
Currently, IPv6 router discovery always puts routes into RT6_TABLE_MAIN. This causes problems for connection managers that want to support multiple simultaneous network connections and want control over which one is used by default (e.g., wifi and wired). To work around this connection managers typically take the routes they prefer and copy them to static routes with low metrics in the main table. This puts the burden on the connection manager to watch netlink to see if the routes have changed, delete the routes when their lifetime expires, etc. Instead, this patch adds a per-interface sysctl to have the kernel put autoconf routes into different tables. This allows each interface to have its own autoconf table, and choosing the default interface (or using different interfaces at the same time for different types of traffic) can be done using appropriate ip rules. The sysctl behaves as follows: - = 0: default. Put routes into RT6_TABLE_MAIN as before. - > 0: manual. Put routes into the specified table. - < 0: automatic. Add the absolute value of the sysctl to the device's ifindex, and use that table. The automatic mode is most useful in conjunction with net.ipv6.conf.default.accept_ra_rt_table. A connection manager or distribution could set it to, say, -100 on boot, and thereafter just use IP rules. Change-Id: I82d16e3737d9cdfa6489e649e247894d0d60cbb1 Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ipv6.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 850e95bc766..867833ba6bd 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -36,6 +36,7 @@ struct ipv6_devconf {
__s32 accept_ra_rt_info_max_plen;
#endif
#endif
+ __s32 accept_ra_rt_table;
__s32 proxy_ndp;
__s32 accept_source_route;
#ifdef CONFIG_IPV6_OPTIMISTIC_DAD