net_sched: better precise estimation on packet length for untrusted packets
authorJason Wang <jasowang@redhat.com>
Mon, 25 Mar 2013 20:19:59 +0000 (20:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Mar 2013 16:44:44 +0000 (12:44 -0400)
commit15e5a030716468dce4032fa0f398d840fa2756f6
tree59a450599ed491e4bd117ea56a60f5ab79821586
parentf9ca8f74399f9195fd8e01f67a8424a8d33efa55
net_sched: better precise estimation on packet length for untrusted packets

gso_segs were reset to zero when kernel receive packets from untrusted
source. But we use this zero value to estimate precise packet len which is
wrong. So this patch tries to estimate the correct gso_segs value before using
it in qdisc_pkt_len_init().

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c