File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -585,7 +585,7 @@ static inline bool skb_vlan_tagged(const struct sk_buff *skb)
585
585
* Returns true if the skb is tagged with multiple vlan headers, regardless
586
586
* of whether it is hardware accelerated or not.
587
587
*/
588
- static inline bool skb_vlan_tagged_multi (const struct sk_buff * skb )
588
+ static inline bool skb_vlan_tagged_multi (struct sk_buff * skb )
589
589
{
590
590
__be16 protocol = skb -> protocol ;
591
591
@@ -596,6 +596,9 @@ static inline bool skb_vlan_tagged_multi(const struct sk_buff *skb)
596
596
protocol != htons (ETH_P_8021AD )))
597
597
return false;
598
598
599
+ if (unlikely (!pskb_may_pull (skb , VLAN_ETH_HLEN )))
600
+ return false;
601
+
599
602
veh = (struct vlan_ethhdr * )skb -> data ;
600
603
protocol = veh -> h_vlan_encapsulated_proto ;
601
604
}
@@ -613,7 +616,7 @@ static inline bool skb_vlan_tagged_multi(const struct sk_buff *skb)
613
616
*
614
617
* Returns features without unsafe ones if the skb has multiple tags.
615
618
*/
616
- static inline netdev_features_t vlan_features_check (const struct sk_buff * skb ,
619
+ static inline netdev_features_t vlan_features_check (struct sk_buff * skb ,
617
620
netdev_features_t features )
618
621
{
619
622
if (skb_vlan_tagged_multi (skb )) {
Original file line number Diff line number Diff line change @@ -2706,7 +2706,7 @@ netdev_features_t passthru_features_check(struct sk_buff *skb,
2706
2706
}
2707
2707
EXPORT_SYMBOL (passthru_features_check );
2708
2708
2709
- static netdev_features_t dflt_features_check (const struct sk_buff * skb ,
2709
+ static netdev_features_t dflt_features_check (struct sk_buff * skb ,
2710
2710
struct net_device * dev ,
2711
2711
netdev_features_t features )
2712
2712
{
You can’t perform that action at this time.
0 commit comments