Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: Pass NULL to skb_network_protocol() when we don't care about vlan depth

When we don't care about vlan depth, we could pass NULL instead of the
address of a unused local variable to skb_network_protocol() as a param.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Miaohe Lin and committed by
David S. Miller
9fc95f50 83a33b24

+1 -2
+1 -2
net/core/dev.c
··· 3454 3454 static netdev_features_t harmonize_features(struct sk_buff *skb, 3455 3455 netdev_features_t features) 3456 3456 { 3457 - int tmp; 3458 3457 __be16 type; 3459 3458 3460 - type = skb_network_protocol(skb, &tmp); 3459 + type = skb_network_protocol(skb, NULL); 3461 3460 features = net_mpls_features(skb, features, type); 3462 3461 3463 3462 if (skb->ip_summed != CHECKSUM_NONE &&