Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afc1c781 authored by Sreeram Ramachandran's avatar Sreeram Ramachandran Committed by Ian Maund
Browse files

Handle 'sk' being NULL in UID-based routing.



Bug: 15413527
Change-Id: If33bebb7b52c0ebfa8dac2452607bce0c2b0faa0
Signed-off-by: default avatarSreeram Ramachandran <sreeram@google.com>
Git-commit: 44fcf31c209f9d915a86da79cd980d57a31e8838
Git-repo: https://android.googlesource.com/kernel/common.git


Signed-off-by: default avatarIan Maund <imaund@codeaurora.org>
parent c049a981
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,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, sock_i_uid(sk));
			   daddr, saddr, dport, sport, sk ? sock_i_uid(sk) : KUIDT_INIT(0));
	if (sk)
		security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
	return ip_route_output_flow(net, fl4, sk);
+1 −1
Original line number Diff line number Diff line
@@ -516,7 +516,7 @@ static void __build_flow_key(struct flowi4 *fl4, struct sock *sk,
			   RT_SCOPE_UNIVERSE, prot,
			   flow_flags,
			   iph->daddr, iph->saddr, 0, 0,
			   sock_i_uid(sk));
			   sk ? sock_i_uid(sk) : KUIDT_INIT(0));
}

static void build_skb_flow_key(struct flowi4 *fl4, const struct sk_buff *skb,