File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ static inline bool skb_vlan_tagged(const struct sk_buff *skb)
584
584
* Returns true if the skb is tagged with multiple vlan headers, regardless
585
585
* of whether it is hardware accelerated or not.
586
586
*/
587
- static inline bool skb_vlan_tagged_multi (const struct sk_buff * skb )
587
+ static inline bool skb_vlan_tagged_multi (struct sk_buff * skb )
588
588
{
589
589
__be16 protocol = skb -> protocol ;
590
590
@@ -594,6 +594,9 @@ static inline bool skb_vlan_tagged_multi(const struct sk_buff *skb)
594
594
if (likely (!eth_type_vlan (protocol )))
595
595
return false;
596
596
597
+ if (unlikely (!pskb_may_pull (skb , VLAN_ETH_HLEN )))
598
+ return false;
599
+
597
600
veh = (struct vlan_ethhdr * )skb -> data ;
598
601
protocol = veh -> h_vlan_encapsulated_proto ;
599
602
}
@@ -611,7 +614,7 @@ static inline bool skb_vlan_tagged_multi(const struct sk_buff *skb)
611
614
*
612
615
* Returns features without unsafe ones if the skb has multiple tags.
613
616
*/
614
- static inline netdev_features_t vlan_features_check (const struct sk_buff * skb ,
617
+ static inline netdev_features_t vlan_features_check (struct sk_buff * skb ,
615
618
netdev_features_t features )
616
619
{
617
620
if (skb_vlan_tagged_multi (skb )) {
Original file line number Diff line number Diff line change @@ -2903,7 +2903,7 @@ netdev_features_t passthru_features_check(struct sk_buff *skb,
2903
2903
}
2904
2904
EXPORT_SYMBOL (passthru_features_check );
2905
2905
2906
- static netdev_features_t dflt_features_check (const struct sk_buff * skb ,
2906
+ static netdev_features_t dflt_features_check (struct sk_buff * skb ,
2907
2907
struct net_device * dev ,
2908
2908
netdev_features_t features )
2909
2909
{
You can’t perform that action at this time.
0 commit comments