On Dienstag, 15. Mai 2018 17:59:08 CEST Linus Lüssing wrote:
magic = skb_header_pointer(skb, offset, sizeof(_magic), &_magic);
if (!magic || *magic != htonl(BATADV_DHCP_MAGIC))
return -EINVAL;
I just hear a neoraider cry [1] in the background because you've added a new potentially unaligned 4 byte access in the network packet parsing code.
[...]
+static __be32 *batadv_dat_dhcp_get_yiaddr(struct sk_buff *skb, __be32 *buffer) +{
unsigned int offset = skb_transport_offset(skb) + sizeof(struct udphdr);
unsigned int len = sizeof(((struct batadv_dhcp_packet *)0)->yiaddr);
offset += offsetof(struct batadv_dhcp_packet, yiaddr);
return skb_header_pointer(skb, offset, len, buffer);
+}
Same here
Kind regards, Sven