]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
proxyarp: Fix x_snoop multicast-to-unicast debug print
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 28 Nov 2014 17:43:58 +0000 (19:43 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 28 Nov 2014 20:37:05 +0000 (22:37 +0200)
l2_packet_send() returns >= 0 on success, i.e., non-zero value does not
mean failure. Fix this debug print to show up only on negative return
values.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/x_snoop.c

index 09c621cdd23f4282c12320bc7d907db8fa0b7abf..8f77015ef57fb940ddd951661aa98a11ce5b3832 100644 (file)
@@ -104,7 +104,7 @@ void x_snoop_mcast_to_ucast_convert_send(struct hostapd_data *hapd,
 
        os_memcpy(buf, sta->addr, ETH_ALEN);
        res = l2_packet_send(hapd->sock_dhcp, NULL, 0, buf, len);
-       if (res) {
+       if (res < 0) {
                wpa_printf(MSG_DEBUG,
                           "x_snoop: Failed to send mcast to ucast converted packet to "
                           MACSTR, MAC2STR(sta->addr));