File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -552,7 +552,7 @@ static void erspan_fb_xmit(struct sk_buff *skb, struct net_device *dev)
552
552
truncate = true;
553
553
}
554
554
555
- nhoff = skb_network_header ( skb ) - skb_mac_header (skb );
555
+ nhoff = skb_network_offset (skb );
556
556
if (skb -> protocol == htons (ETH_P_IP ) &&
557
557
(ntohs (ip_hdr (skb )-> tot_len ) > skb -> len - nhoff ))
558
558
truncate = true;
@@ -561,7 +561,7 @@ static void erspan_fb_xmit(struct sk_buff *skb, struct net_device *dev)
561
561
int thoff ;
562
562
563
563
if (skb_transport_header_was_set (skb ))
564
- thoff = skb_transport_header ( skb ) - skb_mac_header (skb );
564
+ thoff = skb_transport_offset (skb );
565
565
else
566
566
thoff = nhoff + sizeof (struct ipv6hdr );
567
567
if (ntohs (ipv6_hdr (skb )-> payload_len ) > skb -> len - thoff )
Original file line number Diff line number Diff line change @@ -959,7 +959,7 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
959
959
truncate = true;
960
960
}
961
961
962
- nhoff = skb_network_header ( skb ) - skb_mac_header (skb );
962
+ nhoff = skb_network_offset (skb );
963
963
if (skb -> protocol == htons (ETH_P_IP ) &&
964
964
(ntohs (ip_hdr (skb )-> tot_len ) > skb -> len - nhoff ))
965
965
truncate = true;
@@ -968,7 +968,7 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
968
968
int thoff ;
969
969
970
970
if (skb_transport_header_was_set (skb ))
971
- thoff = skb_transport_header ( skb ) - skb_mac_header (skb );
971
+ thoff = skb_transport_offset (skb );
972
972
else
973
973
thoff = nhoff + sizeof (struct ipv6hdr );
974
974
if (ntohs (ipv6_hdr (skb )-> payload_len ) > skb -> len - thoff )
You can’t perform that action at this time.
0 commit comments