mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
net: reset mac header in dev_start_xmit()
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" Signed-off-by: Eric Dumazet <[email protected]> Cc: Ben Greear <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
12b0004d1d
commit
6d1ccff627
1 file changed
+2
@@ -2835,6 +2835,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.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user