mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
net: Skip GSO length estimation if transport header is not set
qdisc_pkt_len_init expects transport_header to be set for GSO packets. Patch [1] skips transport_header validation for GSO packets that don't have network_header set at the moment of calling virtio_net_hdr_to_skb, and allows them to pass into the stack. After patch [2] no placeholder value is assigned to transport_header if dissection fails, so this patch adds a check to the place where the value of transport_header is used. [1] https://patchwork.ozlabs.org/patch/1044429/ [2] https://patchwork.ozlabs.org/patch/1046122/ Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0a6c33e894
commit
a0dce87521
1 changed files with 1 additions and 1 deletions
|
@ -3421,7 +3421,7 @@ static void qdisc_pkt_len_init(struct sk_buff *skb)
|
|||
/* To get more precise estimation of bytes sent on wire,
|
||||
* we add to pkt_len the headers size of all segments
|
||||
*/
|
||||
if (shinfo->gso_size) {
|
||||
if (shinfo->gso_size && skb_transport_header_was_set(skb)) {
|
||||
unsigned int hdr_len;
|
||||
u16 gso_segs = shinfo->gso_segs;
|
||||
|
||||
|
|
Loading…
Reference in a new issue