diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-04-24 21:54:09 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-04-24 21:54:09 +0000 |
commit | 063cbc109a13f889fbbb1d7011b8d6894e311be1 (patch) | |
tree | f831e2256ba78065be36fb574d7f21f8d0f5740f | |
parent | 7e80cf6838c15be19cad03aeb80996d03a98921b (diff) |
if validation of incoming traffic fails, give the user a clue that this might be related to an UTF8 problem
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1204 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r-- | avahi-core/server.c | 8 | ||||
-rw-r--r-- | avahi-core/wide-area.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/avahi-core/server.c b/avahi-core/server.c index 4aa48a8..9d4026d 100644 --- a/avahi-core/server.c +++ b/avahi-core/server.c @@ -569,7 +569,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac int unicast_response = 0; if (!(key = avahi_dns_packet_consume_key(p, &unicast_response))) { - avahi_log_warn("Packet too short (1)"); + avahi_log_warn(__FILE__": Packet too short or invalid while reading question key. (Maybe an UTF8 problem?)"); goto fail; } @@ -596,7 +596,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac int unique = 0; if (!(record = avahi_dns_packet_consume_record(p, &unique))) { - avahi_log_warn("Packet too short (2)"); + avahi_log_warn(__FILE__": Packet too short or invalid while reading known answer record. (Maybe an UTF8 problem?)"); goto fail; } @@ -615,7 +615,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac int unique = 0; if (!(record = avahi_dns_packet_consume_record(p, &unique))) { - avahi_log_warn("Packet too short (3)"); + avahi_log_warn(__FILE__": Packet too short or invalid while reading probe record. (Maybe an UTF8 problem?)"); goto fail; } @@ -653,7 +653,7 @@ static void handle_response_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInter /* char *txt; */ if (!(record = avahi_dns_packet_consume_record(p, &cache_flush))) { - avahi_log_warn("Packet too short (4)"); + avahi_log_warn(__FILE__": Packet too short or invalid while reading response record. (Maybe an UTF8 problem?)"); break; } diff --git a/avahi-core/wide-area.c b/avahi-core/wide-area.c index d86e548..4072f83 100644 --- a/avahi-core/wide-area.c +++ b/avahi-core/wide-area.c @@ -515,7 +515,7 @@ static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p) { AvahiKey *k; if (!(k = avahi_dns_packet_consume_key(p, NULL))) { - avahi_log_warn(__FILE__": Wide area response packet too short."); + avahi_log_warn(__FILE__": Wide area response packet too short or invalid while reading question key. (Maybe an UTF8 problem?)"); avahi_server_set_errno(e->server, AVAHI_ERR_INVALID_PACKET); final_event = AVAHI_BROWSER_FAILURE; goto finish; @@ -532,7 +532,7 @@ static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p) { AvahiRecord *rr; if (!(rr = avahi_dns_packet_consume_record(p, NULL))) { - avahi_log_warn(__FILE__": Wide area response packet too short (2)."); + avahi_log_warn(__FILE__": Wide area response packet too short or invalid while reading response ecord. (Maybe an UTF8 problem?)"); avahi_server_set_errno(e->server, AVAHI_ERR_INVALID_PACKET); final_event = AVAHI_BROWSER_FAILURE; goto finish; |