Thread (4 messages) 4 messages, 3 authors, 2017-03-06

Re: [PATCH] bridge: Add support for IEEE 802.11 Proxy ARP for IPv6

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2017-02-24 19:55:45

The concept is fine.

Please add some comments to the code about what is happening and why.
The proposed patch is too sparse and has no comments.

quoted hunk ↗ jump to hunk
+	skb = alloc_skb(hlen + sizeof(struct ipv6hdr) + sizeof(*msg) +
+			ndisc_opt_addr_space(dev,
+					     NDISC_NEIGHBOUR_ADVERTISEMENT) +
+			tlen, GFP_ATOMIC);
+	if (!skb)
+		return;
Why not netdev_alloc_skb which takes care of padding and setting skb->dev? 

Rather than doing copy/paste of the code to generate a ND message, it would
be better to have one function in IPv6 code that handles that. That would keep
from having to fix code in two places in the future. Is there some way
to extend ndisc_send_na?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help