File tree 1 file changed +3
-9
lines changed
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -538,10 +538,8 @@ static void *packet_current_frame(struct packet_sock *po,
538
538
return packet_lookup_frame (po , rb , rb -> head , status );
539
539
}
540
540
541
- static u16 vlan_get_tci (struct sk_buff * skb , struct net_device * dev )
541
+ static u16 vlan_get_tci (const struct sk_buff * skb , struct net_device * dev )
542
542
{
543
- u8 * skb_orig_data = skb -> data ;
544
- int skb_orig_len = skb -> len ;
545
543
struct vlan_hdr vhdr , * vh ;
546
544
unsigned int header_len ;
547
545
@@ -562,12 +560,8 @@ static u16 vlan_get_tci(struct sk_buff *skb, struct net_device *dev)
562
560
else
563
561
return 0 ;
564
562
565
- skb_push (skb , skb -> data - skb_mac_header (skb ));
566
- vh = skb_header_pointer (skb , header_len , sizeof (vhdr ), & vhdr );
567
- if (skb_orig_data != skb -> data ) {
568
- skb -> data = skb_orig_data ;
569
- skb -> len = skb_orig_len ;
570
- }
563
+ vh = skb_header_pointer (skb , skb_mac_offset (skb ) + header_len ,
564
+ sizeof (vhdr ), & vhdr );
571
565
if (unlikely (!vh ))
572
566
return 0 ;
573
567
You can’t perform that action at this time.
0 commit comments