Willem de Bruijn 9887cba199 ip: limit use of gso_size to udp
The ipcm(6)_cookie field gso_size is set only in the udp path. The ip
layer copies this to cork only if sk_type is SOCK_DGRAM. This check
proved too permissive. Ping and l2tp sockets have the same type.

Limit to sockets of type SOCK_DGRAM and protocol IPPROTO_UDP to
exclude ping sockets.

v1 -> v2
- remove irrelevant whitespace changes

Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT")
Reported-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-20 14:41:04 +09:00
..
2018-06-12 16:19:22 -07:00
2018-06-20 09:07:46 +09:00
2018-05-26 09:16:44 +02:00
2018-06-12 16:19:22 -07:00
2018-06-20 14:41:04 +09:00
2018-06-20 14:41:04 +09:00
2018-05-26 09:16:44 +02:00
2018-03-27 13:18:09 -04:00
2018-06-12 16:19:22 -07:00
2018-05-04 12:54:38 -04:00
2018-06-12 16:19:22 -07:00
2018-05-28 22:59:54 -04:00
2018-06-05 10:21:18 -04:00