提交 9fc95f50 编写于 作者: M Miaohe Lin 提交者: David S. Miller

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: NMiaohe Lin <linmiaohe@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 83a33b24
...@@ -3454,10 +3454,9 @@ static netdev_features_t net_mpls_features(struct sk_buff *skb, ...@@ -3454,10 +3454,9 @@ static netdev_features_t net_mpls_features(struct sk_buff *skb,
static netdev_features_t harmonize_features(struct sk_buff *skb, static netdev_features_t harmonize_features(struct sk_buff *skb,
netdev_features_t features) netdev_features_t features)
{ {
int tmp;
__be16 type; __be16 type;
type = skb_network_protocol(skb, &tmp); type = skb_network_protocol(skb, NULL);
features = net_mpls_features(skb, features, type); features = net_mpls_features(skb, features, type);
if (skb->ip_summed != CHECKSUM_NONE && if (skb->ip_summed != CHECKSUM_NONE &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册