net: reset mac header in dev_start_xmit()
Subsystems (2)
PATCH 1/2 net: reset mac header in dev_start_xmit()
From: Eric Dumazet <[email protected]>
On 64 bit arches :
There is a off-by-one error in qdisc_pkt_len_init() because mac_header is not set in xmit path.
skb_mac_header() returns an out of bound value that was harmless because hdr_len is an 'unsigned int'
On 32bit arches, the error is abysmal.
This patch is also a prereq for "macvlan: add multicast filter"
--- net/core/dev.c | 2 ++ 1 file changed, 2 insertions(+)
net/core/dev.c +2 -0
@@ -2799,6 +2799,8 @@ int dev_queue_xmit(struct sk_buff *skb)struct Qdisc *q;int rc = -ENOMEM ; +skb_reset_mac_header (skb); +/* Disable soft irqs for various locks below. Also * stops preemption for RCU. */
Quoted 7 lines · Eric Dumazet
From: Eric Dumazet <[email protected]>
On 64 bit arches :
There is a off-by-one error in
qdisc_pkt_len_init()becausemac_headeris not set in xmit path.
Quoted 6 lines
skb_mac_header()returns an out of bound value that was harmless becausehdr_lenis an 'unsigned int'On 32bit arches, the error is abysmal.
This patch is also a prereq for "macvlan: add multicast filter"
I'll go ahead and apply this one to our tree for testing, and will apply the multicast one as soon as I resolve some bugs that currently have me swamped...
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
From: Eric Dumazet <[email protected]>
Date: Tue, 05 Feb 2013 22:22:20 -0800
Quoted 7 lines
From: Eric Dumazet <[email protected]>
On 64 bit arches :
There is a off-by-one error in
qdisc_pkt_len_init()becausemac_headeris not set in xmit path.
Quoted 8 lines
skb_mac_header()returns an out of bound value that was harmless becausehdr_lenis an 'unsigned int'On 32bit arches, the error is abysmal.
This patch is also a prereq for "macvlan: add multicast filter"
Signed-off-by Eric Dumazet <[email protected]>
Applied.