Skip to content

Commit

Permalink
Revert "Revert "Handle 'sk' being NULL in UID-based routing.""
Browse files Browse the repository at this point in the history
This reverts commit 814b86b.
  • Loading branch information
kholk committed Feb 20, 2015
1 parent 25258e1 commit d62a484
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/net/route.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, sock_i_uid(sk));
daddr, saddr, dport, sport, sk ? sock_i_uid(sk) : 0);
if (sk)
security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
return ip_route_output_flow(net, fl4, sk);
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,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) : 0);
}

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

0 comments on commit d62a484

Please sign in to comment.