We should not assume mac header is set in output path.
Use skb_eth_hdr() instead of eth_hdr() to fix the issue,
and remove now redundant skb_reset_mac_header().
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
drivers/net/macsec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 6f9f3aceffaad311d5d47bb93fa0df59082aa9f9..da7f917e71807410c050bcf4a8ed836272ab87cb 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -503,8 +503,7 @@ static void macsec_encrypt_finish(struct sk_buff *skb, struct net_device *dev)
struct macsec_dev *macsec = netdev_priv(dev);
skb->dev = macsec->real_dev;
- skb_reset_mac_header(skb);
- skb->protocol = eth_hdr(skb)->h_proto;
+ skb->protocol = skb_eth_hdr(skb)->h_proto;
}
static unsigned int macsec_msdu_len(struct sk_buff *skb)
--
2.55.0.966.g6673acef38-goog