diff options
author | Paul Moore <paul@paul-moore.com> | 2020-09-28 05:38:26 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-11-24 02:36:21 +0300 |
commit | 3df98d79215ace13d1e91ddfc5a67a0f5acbd83f (patch) | |
tree | 3e0db692f0d85f9a73ec0e2dd4298bda62f57b8b /net/ipv4/ip_output.c | |
parent | b2d99bcb27225fe420a8923b21861aef2bb43d9b (diff) | |
download | linux-3df98d79215ace13d1e91ddfc5a67a0f5acbd83f.tar.xz |
lsm,selinux: pass flowi_common instead of flowi to the LSM hooks
As pointed out by Herbert in a recent related patch, the LSM hooks do
not have the necessary address family information to use the flowi
struct safely. As none of the LSMs currently use any of the protocol
specific flowi information, replace the flowi pointers with pointers
to the address family independent flowi_common struct.
Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 879b76ae4435..89fff5f59eea 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1700,7 +1700,7 @@ void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb, daddr, saddr, tcp_hdr(skb)->source, tcp_hdr(skb)->dest, arg->uid); - security_skb_classify_flow(skb, flowi4_to_flowi(&fl4)); + security_skb_classify_flow(skb, flowi4_to_flowi_common(&fl4)); rt = ip_route_output_key(net, &fl4); if (IS_ERR(rt)) return; |