android_kernel_oneplus_msm8998/net/l2tp
Lorenzo Colitti a8e959ae30 net: inet: Support UID-based routing in IP protocols.
- Use the UID in routing lookups made by protocol connect() and
  sendmsg() functions.
- Make sure that routing lookups triggered by incoming packets
  (e.g., Path MTU discovery) take the UID of the socket into
  account.
- For packets not associated with a userspace socket, (e.g., ping
  replies) use UID 0 inside the user namespace corresponding to
  the network namespace the socket belongs to. This allows
  all namespaces to apply routing and iptables rules to
  kernel-originated traffic in that namespaces by matching UID 0.
  This is better than using the UID of the kernel socket that is
  sending the traffic, because the UID of kernel sockets created
  at namespace creation time (e.g., the per-processor ICMP and
  TCP sockets) is the UID of the user that created the socket,
  which might not be mapped in the namespace.

Bug: 16355602
Change-Id: I910504b508948057912bc188fd1e8aca28294de3
Tested: compiles allnoconfig, allyesconfig, allmodconfig
Tested: https://android-review.googlesource.com/253302
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

[AmitP: A little bit of refactoring because of LTS cherry-pick commit
        e5abc10d19 ("tcp: fix NULL deref in tcp_v4_send_ack()")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2017-01-02 14:44:15 +05:30
..
Kconfig l2tp: Call udp_sock_create 2014-07-14 16:12:15 -07:00
l2tp_core.c l2tp: fix configuration passed to setup_udp_tunnel_sock() 2016-06-24 10:18:17 -07:00
l2tp_core.h l2tp: auto load type modules 2015-09-25 12:27:22 -07:00
l2tp_debugfs.c ipv6: make lookups simpler and faster 2013-10-09 00:01:25 -04:00
l2tp_eth.c l2tp: auto load type modules 2015-09-25 12:27:22 -07:00
l2tp_ip.c l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind() 2016-12-10 19:07:23 +01:00
l2tp_ip6.c net: inet: Support UID-based routing in IP protocols. 2017-01-02 14:44:15 +05:30
l2tp_netlink.c l2tp: Fix error creating L2TP tunnels 2016-03-03 15:07:07 -08:00
l2tp_ppp.c l2tp: auto load type modules 2015-09-25 12:27:22 -07:00
Makefile l2tp: introduce L2TPv3 IP encapsulation support for IPv6 2012-05-01 09:30:55 -04:00