kernel-fxtec-pro1x/include
Lorenzo Colitti f02d3d4a0c ANDROID: 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>

[AmitP: Refactored original changes to align with
        the changes introduced by upstream commit
        830218c1ad ("net: ipv6: Fix processing of RAs in presence of VRF")

        Also folded following android-4.9 commit changes into this patch
        be65fb01da4d ("ANDROID: net: ipv6: remove unused variable ifindex in")]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2018-08-28 17:10:42 +05:30
..
acpi
asm-generic Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
clocksource
crypto
drm
dt-bindings ARM: SoC: late updates 2018-08-25 14:12:36 -07:00
keys
kvm
linux ANDROID: net: ipv6: autoconf routes into per-device tables 2018-08-28 17:10:42 +05:30
math-emu
media
memory
misc
net ANDROID: net: ipv6: autoconf routes into per-device tables 2018-08-28 17:10:42 +05:30
pcmcia
ras
rdma
scsi
soc
sound
target
trace ANDROID: fs: Refactor FS readpage/write tracepoints. 2018-08-28 17:10:42 +05:30
uapi ANDROID: net: ipv6: autoconf routes into per-device tables 2018-08-28 17:10:42 +05:30
video
xen