Ping?

---------- Forwarded message ----------
Date: Wed, 8 Oct 2008 20:54:31 +0200 (CEST)
To: [email protected]

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:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to