From: Gert Doering Date: Sat, 30 Jun 2012 20:50:43 +0000 (+0200) Subject: Repair "tap server" mode brokenness caused by fallout X-Git-Tag: v2.3_alpha3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8df08de6f84d224c6a79ab6c74ba73c33a47735d;p=thirdparty%2Fopenvpn.git Repair "tap server" mode brokenness caused by fallout Operator/Cast precedence wrong: casting mac[0] to (bool) first - giving "1" for "any mac address that does not start with 00:" - and only then bit-anding with "1" - thus always returning "true". Which, in turn, leads to "reject all incoming packets with 'bad source address'". OpenVPN bug #216. Signed-off-by: Gert Doering Acked-by: Fabian Knittel Message-Id: 1341089443-2287-1-git-send-email-gert@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/6817 Signed-off-by: David Sommerseth --- diff --git a/src/openvpn/mroute.c b/src/openvpn/mroute.c index aecb7027a..850e33630 100644 --- a/src/openvpn/mroute.c +++ b/src/openvpn/mroute.c @@ -52,7 +52,7 @@ mroute_addr_init (struct mroute_addr *addr) static inline bool is_mac_mcast_addr (const uint8_t *mac) { - return (bool) mac[0] & 1; + return (bool) (mac[0] & 1); } static inline bool