proto: fix logic inversion in previous commit
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Mon, 17 Dec 2018 18:26:11 +0000 (18:26 +0000)
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Mon, 17 Dec 2018 18:26:11 +0000 (18:26 +0000)
Rogue ! effectively disabled the ipv6 multicast check.  Fix cd089c52

Why is it always the simple changes that catch you out?

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
proto.c

diff --git a/proto.c b/proto.c
index 2819e301036f5a991ac883c947f18203052b4c63..cbc92b1321d372eb324b425dbd46efe2bae98a52 100644 (file)
--- a/proto.c
+++ b/proto.c
@@ -131,7 +131,7 @@ parse_addr(struct interface *iface, const char *str, bool v6, int mask,
        if (!parse_ip_and_netmask(af, str, &addr->addr, &addr->mask))
                goto error;
 
-       if (!v6 && IN6_IS_ADDR_MULTICAST(&addr->addr.in6))
+       if (v6 && IN6_IS_ADDR_MULTICAST(&addr->addr.in6))
                goto error;
 
        if (broadcast)