macvlan: use skb_reset_mac_header() in macvlan_queue_xmit()
authorEric Dumazet <edumazet@google.com>
Tue, 14 Jan 2020 21:00:35 +0000 (13:00 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:19:41 +0000 (08:19 +0100)
commitbde7568224a8d1fca99d00ec3f35d9f8fdc50cc6
tree3c4337674eb8b3153e63c696c24abdb3780f7b5e
parent717e9a5279a259e5463eab4515d82b4d998e8b20
macvlan: use skb_reset_mac_header() in macvlan_queue_xmit()

[ Upstream commit 1712b2fff8c682d145c7889d2290696647d82dab ]

I missed the fact that macvlan_broadcast() can be used both
in RX and TX.

skb_eth_hdr() makes only sense in TX paths, so we can not
use it blindly in macvlan_broadcast()

Fixes: 96cc4b69581d ("macvlan: do not assume mac_header is set in macvlan_broadcast()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Jurgen Van Ham <juvanham@gmail.com>
Tested-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/macvlan.c