Skip to content
This repository was archived by the owner on Aug 21, 2018. It is now read-only.

Commit 15151d5

Browse files
Sreeram RamachandranJustArchi
authored andcommitted
Handle 'sk' being NULL in UID-based routing.
Bug: 15413527 Change-Id: If33bebb7b52c0ebfa8dac2452607bce0c2b0faa0 Signed-off-by: Sreeram Ramachandran <sreeram@google.com>
1 parent 6189455 commit 15151d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/route.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi
147147
flowi4_init_output(fl4, oif, sk ? sk->sk_mark : 0, tos,
148148
RT_SCOPE_UNIVERSE, proto,
149149
sk ? inet_sk_flowi_flags(sk) : 0,
150-
daddr, saddr, dport, sport, sock_i_uid(sk));
150+
daddr, saddr, dport, sport, sk ? sock_i_uid(sk) : 0);
151151
if (sk)
152152
security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
153153
return ip_route_output_flow(net, fl4, sk);

0 commit comments

Comments
 (0)