diff options
author | Paolo Abeni <pabeni@redhat.com> | 2017-08-03 19:07:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-07 06:51:12 +0300 |
commit | 91ed1e666a4ea2e260452a7d7d311ac5ae852cba (patch) | |
tree | a05e165ba6029e23c0308eaadb958cc863f2c5da /net/ipv4/tcp_ipv4.c | |
parent | a1e155ece1a5b68c4f845788e03a567574f606aa (diff) | |
download | linux-91ed1e666a4ea2e260452a7d7d311ac5ae852cba.tar.xz |
ip/options: explicitly provide net ns to __ip_options_echo()
__ip_options_echo() uses the current network namespace, and
currently retrives it via skb->dst->dev.
This commit adds an explicit 'net' argument to __ip_options_echo()
and update all the call sites to provide it, usually via a simpler
sock_net().
After this change, __ip_options_echo() no more needs to access
skb->dst and we can drop a couple of hack to preserve such
info in the rx path.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 9b51663cd5a4..5f708c85110e 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1267,7 +1267,7 @@ static void tcp_v4_init_req(struct request_sock *req, sk_rcv_saddr_set(req_to_sk(req), ip_hdr(skb)->daddr); sk_daddr_set(req_to_sk(req), ip_hdr(skb)->saddr); - ireq->opt = tcp_v4_save_options(skb); + ireq->opt = tcp_v4_save_options(sock_net(sk_listener), skb); } static struct dst_entry *tcp_v4_route_req(const struct sock *sk, |