diff options
author | Sreeram Ramachandran <sreeram@google.com> | 2014-07-08 11:57:14 -0700 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2016-02-16 13:51:37 -0800 |
commit | ad493510385ee040516bf83a60e6c4921fcdfdac (patch) | |
tree | 97204875e23e9969a7e1470db329cff24cc4e093 /include/net | |
parent | fd2cf795f3ab193752781be7372949ac1780d0ed (diff) |
net: core: Handle 'sk' being NULL in UID-based routing
It has Amit Pundir <amit.pundir@linaro.org> fix:
net: core: fix UID-based routing build
Bug: 15413527
Change-Id: Iab1fae9da6053b284591628ef1de878761b137b1
Signed-off-by: Sreeram Ramachandran <sreeram@google.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/route.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/route.h b/include/net/route.h index bf6fe1a6527e..d016a8cb45cf 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -154,7 +154,8 @@ 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, sock_i_uid(sk)); + daddr, saddr, dport, sport, + sk ? sock_i_uid(sk) : GLOBAL_ROOT_UID); if (sk) security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); return ip_route_output_flow(net, fl4, sk); |