From: Sven M. Hallberg Date: Mon, 8 Sep 2014 16:21:39 +0000 (+0200) Subject: be more specific in an error message when receiving packets X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=37f897cd8f66ef4233d50110ef00469d23596d2b;p=catta be more specific in an error message when receiving packets --- diff --git a/src/server.c b/src/server.c index 5a9e050..fffbfdf 100644 --- a/src/server.c +++ b/src/server.c @@ -899,9 +899,12 @@ static void dispatch_packet(CattaServer *s, CattaDnsPacket *p, const CattaAddres assert(iface > 0); assert(src_address->proto == dst_address->proto); - if (!(i = catta_interface_monitor_get_interface(s->monitor, iface, src_address->proto)) || - !i->announcing) { - catta_log_warn("Received packet from invalid interface."); + if (!(i = catta_interface_monitor_get_interface(s->monitor, iface, src_address->proto))) { + catta_log_warn("Received packet from unrecognized interface (%d).", iface); + return; + } + if (!i->announcing) { + catta_log_warn("Received packet from invalid interface %d (not announcing).", iface); return; }