]> git.meshlink.io Git - catta/commitdiff
if validation of incoming traffic fails, give the user a clue that this might be...
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Apr 2006 21:54:09 +0000 (21:54 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Apr 2006 21:54:09 +0000 (21:54 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1204 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/server.c
avahi-core/wide-area.c

index 4aa48a8467ae84c3583e34c5836dc0474cb10fc2..9d4026d10b1a0a73b7026f3e63ab9466a9077875 100644 (file)
@@ -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;
         }
 
index d86e5482a8e371c51ded74faa1bac80fae55c83c..4072f831e7771658e6a047f7d19db901534a3ba5 100644 (file)
@@ -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;