aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2018-07-06 10:12:59 -0400
committerDavid S. Miller <davem@davemloft.net>2018-07-07 10:58:49 +0900
commitfbf47813607ba8c4e5c5b81da3c47fc66ac314b1 (patch)
tree9ab9ed3c9a6a5018df2faec2dab0b896aacd3bca /net/ipv4/ip_output.c
parentip: remove tx_flags from ipcm_cookie and use same logic for v4 and v6 (diff)
downloadlinux-dev-fbf47813607ba8c4e5c5b81da3c47fc66ac314b1.tar.xz
linux-dev-fbf47813607ba8c4e5c5b81da3c47fc66ac314b1.zip
ip: unconditionally set cork gso_size
Now that ipc(6)->gso_size is correctly initialized in all callers of ip(6)_setup_cork, it is safe to unconditionally pass it to the cork. Link: http://lkml.kernel.org/r/20180619164752.143249-1-willemdebruijn.kernel@gmail.com Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index e14c774cc092..e2b6bd478afb 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1146,8 +1146,7 @@ static int ip_setup_cork(struct sock *sk, struct inet_cork *cork,
cork->fragsize = ip_sk_use_pmtu(sk) ?
dst_mtu(&rt->dst) : rt->dst.dev->mtu;
- cork->gso_size = sk->sk_type == SOCK_DGRAM &&
- sk->sk_protocol == IPPROTO_UDP ? ipc->gso_size : 0;
+ cork->gso_size = ipc->gso_size;
cork->dst = &rt->dst;
cork->length = 0;
cork->ttl = ipc->ttl;