mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-05 08:48:53 +00:00
batman-adv: Remove unused post-VLAN ethhdr in batadv_gw_dhcp_recipient_get
Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
This commit is contained in:
parent
a2f2b6cd41
commit
7dac6d9391
@ -753,11 +753,6 @@ batadv_gw_dhcp_recipient_get(struct sk_buff *skb, unsigned int *header_len,
|
|||||||
if (!pskb_may_pull(skb, *header_len + sizeof(*udphdr)))
|
if (!pskb_may_pull(skb, *header_len + sizeof(*udphdr)))
|
||||||
return BATADV_DHCP_NO;
|
return BATADV_DHCP_NO;
|
||||||
|
|
||||||
/* skb->data might have been reallocated by pskb_may_pull() */
|
|
||||||
ethhdr = eth_hdr(skb);
|
|
||||||
if (ntohs(ethhdr->h_proto) == ETH_P_8021Q)
|
|
||||||
ethhdr = (struct ethhdr *)(skb->data + VLAN_HLEN);
|
|
||||||
|
|
||||||
udphdr = (struct udphdr *)(skb->data + *header_len);
|
udphdr = (struct udphdr *)(skb->data + *header_len);
|
||||||
*header_len += sizeof(*udphdr);
|
*header_len += sizeof(*udphdr);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user