File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 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,
538538 return packet_lookup_frame (po , rb , rb -> head , status );
539539}
540540
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 )
542542{
543- u8 * skb_orig_data = skb -> data ;
544- int skb_orig_len = skb -> len ;
545543 struct vlan_hdr vhdr , * vh ;
546544 unsigned int header_len ;
547545
@@ -562,12 +560,8 @@ static u16 vlan_get_tci(struct sk_buff *skb, struct net_device *dev)
562560 else
563561 return 0 ;
564562
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 );
571565 if (unlikely (!vh ))
572566 return 0 ;
573567
You can’t perform that action at this time.
0 commit comments