On Sonntag, 4. März 2018 12:58:37 CET Linus Lüssing wrote:
If a node signals that it wants all traffic for a specific protocol family then there is no need to announce individual multicast addresses via TT.
Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue
net/batman-adv/multicast.c | 56 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-)
I cannot say much about the TT details but just some remarks about some coding style details.
+static bool batadv_mcast_addr_is_ipv4(unsigned char *addr)
We usually would use "const u8 *addr" here maybe I missed something but I would expect that this is also used here.
+{
- const unsigned char prefix[] = { 0x01, 0x00, 0x5E };
All other single line array initializations in the code used "{" without extra space after it and "}" without extra space before it.
- return !memcmp(prefix, addr, sizeof(prefix));
+}
Could you please use "== 0" here instead of "!". Every time I read !memcmp, I am assuming for a short period of time that the memcpy must "fail" here.
+static bool batadv_mcast_addr_is_ipv6(unsigned char *addr)
We usually would use "const u8 *addr" here maybe I missed something but I would expect that this is also used here.
+{
- const unsigned char prefix[] = { 0x33, 0x33 };
All other single line array initializations in the code used "{" without extra space after it and "}" without extra space before it.
- return !memcmp(prefix, addr, sizeof(prefix));
Could you please use "== 0" here instead of "!". Every time I read !memcmp, I am assuming for a short period of time that the memcpy must "fail" here.
Kind regards, Sven