From: Stricted Date: Thu, 28 Feb 2019 11:20:37 +0000 (+0000) Subject: Revert "Handle 'sk' being NULL in UID-based routing." X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b130b902e2b607a17cb22677e1d40bcbaecb1ea8;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git Revert "Handle 'sk' being NULL in UID-based routing." This reverts commit 455b09d66a9ccfc572497ae88375ae343ff9ae66. Change-Id: I1d95864d8b48ae3ca418cfd790cfd62c07f54f66 --- diff --git a/include/net/route.h b/include/net/route.h index 647bb2adbffd..b5b44875543e 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -142,7 +142,7 @@ static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi flowi4_init_output(fl4, oif, sk ? sk->sk_mark : 0, tos, RT_SCOPE_UNIVERSE, proto, sk ? inet_sk_flowi_flags(sk) : 0, - daddr, saddr, dport, sport, sk ? sock_i_uid(sk) : 0); + daddr, saddr, dport, sport, sock_i_uid(sk)); if (sk) security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); return ip_route_output_flow(net, fl4, sk); diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 52e43a21156f..dd1a3c567af6 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -532,7 +532,7 @@ static void __build_flow_key(struct flowi4 *fl4, struct sock *sk, RT_SCOPE_UNIVERSE, prot, flow_flags, iph->daddr, iph->saddr, 0, 0, - sk ? sock_i_uid(sk) : 0); + sock_i_uid(sk)); } static void build_skb_flow_key(struct flowi4 *fl4, const struct sk_buff *skb,