File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -505,14 +505,15 @@ int batadv_v_elp_packet_recv(struct sk_buff *skb,
505
505
struct batadv_priv * bat_priv = netdev_priv (if_incoming -> soft_iface );
506
506
struct batadv_elp_packet * elp_packet ;
507
507
struct batadv_hard_iface * primary_if ;
508
- struct ethhdr * ethhdr = ( struct ethhdr * ) skb_mac_header ( skb ) ;
508
+ struct ethhdr * ethhdr ;
509
509
bool res ;
510
510
int ret = NET_RX_DROP ;
511
511
512
512
res = batadv_check_management_packet (skb , if_incoming , BATADV_ELP_HLEN );
513
513
if (!res )
514
514
goto free_skb ;
515
515
516
+ ethhdr = eth_hdr (skb );
516
517
if (batadv_is_my_mac (bat_priv , ethhdr -> h_source ))
517
518
goto free_skb ;
518
519
Original file line number Diff line number Diff line change @@ -985,7 +985,7 @@ int batadv_v_ogm_packet_recv(struct sk_buff *skb,
985
985
{
986
986
struct batadv_priv * bat_priv = netdev_priv (if_incoming -> soft_iface );
987
987
struct batadv_ogm2_packet * ogm_packet ;
988
- struct ethhdr * ethhdr = eth_hdr ( skb ) ;
988
+ struct ethhdr * ethhdr ;
989
989
int ogm_offset ;
990
990
u8 * packet_pos ;
991
991
int ret = NET_RX_DROP ;
@@ -999,6 +999,7 @@ int batadv_v_ogm_packet_recv(struct sk_buff *skb,
999
999
if (!batadv_check_management_packet (skb , if_incoming , BATADV_OGM2_HLEN ))
1000
1000
goto free_skb ;
1001
1001
1002
+ ethhdr = eth_hdr (skb );
1002
1003
if (batadv_is_my_mac (bat_priv , ethhdr -> h_source ))
1003
1004
goto free_skb ;
1004
1005
You can’t perform that action at this time.
0 commit comments