projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
247fa82
)
net_sched: fix qdisc_pkt_len_init()
author
Eric Dumazet
<
[email protected]
>
Wed, 16 Jan 2013 05:14:21 +0000
(21:14 -0800)
committer
David S. Miller
<
[email protected]
>
Wed, 16 Jan 2013 05:41:19 +0000
(
00:41
-0500)
commit
1def9238d4aa2
(net_sched: more precise pkt_len computation)
does a wrong computation of mac + network headers length, as it includes
the padding before the frame.
Signed-off-by: Eric Dumazet <
[email protected]
>
Cc: Yuval Mintz <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/core/dev.c
patch
|
blob
|
history
diff --git
a/net/core/dev.c
b/net/core/dev.c
index 862eaa744a54791d08119107db2046107abaefb2..b6d2b32933ba13210ab8601d974a9cb585745302 100644
(file)
--- a/
net/core/dev.c
+++ b/
net/core/dev.c
@@
-2776,8
+2776,12
@@
static void qdisc_pkt_len_init(struct sk_buff *skb)
* we add to pkt_len the headers size of all segments
*/
if (shinfo->gso_size) {
- unsigned int hdr_len
= skb_transport_offset(skb)
;
+ unsigned int hdr_len;
+ /* mac layer + network layer */
+ hdr_len = skb_transport_header(skb) - skb_mac_header(skb);
+
+ /* + transport layer */
if (likely(shinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)))
hdr_len += tcp_hdrlen(skb);
else