Hello,

$ grep snmp /etc/hosts.allow
snmpd: 192.168.129.26 127.0.0.1

Before:
 Connection from UDP: [195.177.211.64]->[192.168.129.26]:-19218 REFUSED

With the attached patch:
 Connection from UDP: [192.168.129.26]:43284->[195.177.211.64]

Best regards,


                                Krzysztof Olędzki
diff -Nur net-snmp-5.4.2-orig/snmplib/snmpUDPDomain.c 
net-snmp-5.4.2/snmplib/snmpUDPDomain.c
--- net-snmp-5.4.2-orig/snmplib/snmpUDPDomain.c 2007-10-11 22:46:30.000000000 
+0200
+++ net-snmp-5.4.2/snmplib/snmpUDPDomain.c      2008-10-04 03:30:22.000000000 
+0200
@@ -104,12 +104,12 @@
        char tmp[64];
         to = (struct sockaddr_in *) &(addr_pair->remote_addr);
         if (to == NULL) {
-            sprintf(tmp, "UDP: [%s]->unknown",
+            sprintf(tmp, "UDP: unknown->[%s]",
                     inet_ntoa(addr_pair->local_addr));
         } else {
-            sprintf(tmp, "UDP: [%s]->", inet_ntoa(addr_pair->local_addr));
-            sprintf(tmp + strlen(tmp), "[%s]:%hd",
+            sprintf(tmp, "UDP: [%s]:%hu->",
                     inet_ntoa(to->sin_addr), ntohs(to->sin_port));
+            sprintf(tmp + strlen(tmp), "[%s]", 
inet_ntoa(addr_pair->local_addr));
         }
         return strdup(tmp);
     }
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to