aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index b27a4d792d15..beeab2e8cd66 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -256,7 +256,7 @@ bool batadv_check_management_packet(struct sk_buff *skb,
256 if (unlikely(!pskb_may_pull(skb, header_len))) 256 if (unlikely(!pskb_may_pull(skb, header_len)))
257 return false; 257 return false;
258 258
259 ethhdr = (struct ethhdr *)skb_mac_header(skb); 259 ethhdr = eth_hdr(skb);
260 260
261 /* packet with broadcast indication but unicast recipient */ 261 /* packet with broadcast indication but unicast recipient */
262 if (!is_broadcast_ether_addr(ethhdr->h_dest)) 262 if (!is_broadcast_ether_addr(ethhdr->h_dest))
@@ -392,7 +392,7 @@ int batadv_recv_icmp_packet(struct sk_buff *skb,
392 if (unlikely(!pskb_may_pull(skb, hdr_size))) 392 if (unlikely(!pskb_may_pull(skb, hdr_size)))
393 goto out; 393 goto out;
394 394
395 ethhdr = (struct ethhdr *)skb_mac_header(skb); 395 ethhdr = eth_hdr(skb);
396 396
397 /* packet with unicast indication but broadcast recipient */ 397 /* packet with unicast indication but broadcast recipient */
398 if (is_broadcast_ether_addr(ethhdr->h_dest)) 398 if (is_broadcast_ether_addr(ethhdr->h_dest))
@@ -569,7 +569,7 @@ static int batadv_check_unicast_packet(struct batadv_priv *bat_priv,
569 if (unlikely(!pskb_may_pull(skb, hdr_size))) 569 if (unlikely(!pskb_may_pull(skb, hdr_size)))
570 return -ENODATA; 570 return -ENODATA;
571 571
572 ethhdr = (struct ethhdr *)skb_mac_header(skb); 572 ethhdr = eth_hdr(skb);
573 573
574 /* packet with unicast indication but broadcast recipient */ 574 /* packet with unicast indication but broadcast recipient */
575 if (is_broadcast_ether_addr(ethhdr->h_dest)) 575 if (is_broadcast_ether_addr(ethhdr->h_dest))
@@ -803,7 +803,7 @@ static int batadv_route_unicast_packet(struct sk_buff *skb,
803 struct batadv_orig_node *orig_node = NULL; 803 struct batadv_orig_node *orig_node = NULL;
804 struct batadv_neigh_node *neigh_node = NULL; 804 struct batadv_neigh_node *neigh_node = NULL;
805 struct batadv_unicast_packet *unicast_packet; 805 struct batadv_unicast_packet *unicast_packet;
806 struct ethhdr *ethhdr = (struct ethhdr *)skb_mac_header(skb); 806 struct ethhdr *ethhdr = eth_hdr(skb);
807 int ret = NET_RX_DROP; 807 int ret = NET_RX_DROP;
808 struct sk_buff *new_skb; 808 struct sk_buff *new_skb;
809 809
@@ -1165,7 +1165,7 @@ int batadv_recv_bcast_packet(struct sk_buff *skb,
1165 if (unlikely(!pskb_may_pull(skb, hdr_size))) 1165 if (unlikely(!pskb_may_pull(skb, hdr_size)))
1166 goto out; 1166 goto out;
1167 1167
1168 ethhdr = (struct ethhdr *)skb_mac_header(skb); 1168 ethhdr = eth_hdr(skb);
1169 1169
1170 /* packet with broadcast indication but unicast recipient */ 1170 /* packet with broadcast indication but unicast recipient */
1171 if (!is_broadcast_ether_addr(ethhdr->h_dest)) 1171 if (!is_broadcast_ether_addr(ethhdr->h_dest))
@@ -1265,7 +1265,7 @@ int batadv_recv_vis_packet(struct sk_buff *skb,
1265 return NET_RX_DROP; 1265 return NET_RX_DROP;
1266 1266
1267 vis_packet = (struct batadv_vis_packet *)skb->data; 1267 vis_packet = (struct batadv_vis_packet *)skb->data;
1268 ethhdr = (struct ethhdr *)skb_mac_header(skb); 1268 ethhdr = eth_hdr(skb);
1269 1269
1270 /* not for me */ 1270 /* not for me */
1271 if (!batadv_is_my_mac(bat_priv, ethhdr->h_dest)) 1271 if (!batadv_is_my_mac(bat_priv, ethhdr->h_dest))