mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
net: pktgen: use reset to set mac header
Since offset is zero, it's not necessary to use set function. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
241deec944
commit
c145aeb3ff
@ -2856,7 +2856,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
|
|||||||
*vlan_encapsulated_proto = htons(ETH_P_IP);
|
*vlan_encapsulated_proto = htons(ETH_P_IP);
|
||||||
}
|
}
|
||||||
|
|
||||||
skb_set_mac_header(skb, 0);
|
skb_reset_mac_header(skb);
|
||||||
skb_set_network_header(skb, skb->len);
|
skb_set_network_header(skb, skb->len);
|
||||||
iph = (struct iphdr *) skb_put(skb, sizeof(struct iphdr));
|
iph = (struct iphdr *) skb_put(skb, sizeof(struct iphdr));
|
||||||
|
|
||||||
@ -2983,7 +2983,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
|
|||||||
*vlan_encapsulated_proto = htons(ETH_P_IPV6);
|
*vlan_encapsulated_proto = htons(ETH_P_IPV6);
|
||||||
}
|
}
|
||||||
|
|
||||||
skb_set_mac_header(skb, 0);
|
skb_reset_mac_header(skb);
|
||||||
skb_set_network_header(skb, skb->len);
|
skb_set_network_header(skb, skb->len);
|
||||||
iph = (struct ipv6hdr *) skb_put(skb, sizeof(struct ipv6hdr));
|
iph = (struct ipv6hdr *) skb_put(skb, sizeof(struct ipv6hdr));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user