From: wessels <> Date: Fri, 14 Aug 1998 22:42:02 +0000 (+0000) Subject: fix up snmp_{incoming,outgoing}_addr code X-Git-Tag: SQUID_3_0_PRE1~2902 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15dcc168c3b468e90533f1af6ead7c68dd8f8ff0;p=thirdparty%2Fsquid.git fix up snmp_{incoming,outgoing}_addr code --- diff --git a/src/cf.data.pre b/src/cf.data.pre index 1689f62de3..b0d871efb8 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.94 1998/08/03 19:30:26 wessels Exp $ +# $Id: cf.data.pre,v 1.95 1998/08/14 16:42:02 wessels Exp $ # # # SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -156,7 +156,7 @@ DOC_START udp_outgoing_address is used for ICP packets sent out to other caches. - The defaults behaviour is to not bind to any specific address. + The default behaviour is to not bind to any specific address. NOTE, udp_incoming_address and udp_outgoing_address can not have the same value since they both use port 3130. @@ -2237,6 +2237,33 @@ DOC_START snmp_acl public deny all DOC_END +NAME: snmp_incoming_address +TYPE: address +LOC: Config.Addrs.snmp_outgoing +DEFAULT: 0.0.0.0 +IFDEF: SQUID_SNMP +DOC_NONE +NAME: snmp_outgoing_address +TYPE: address +LOC: Config.Addrs.snmp_outgoing +DEFAULT: 255.255.255.255 +IFDEF: SQUID_SNMP +DOC_START + Just like 'udp_incoming_address' above, but for the SNMP port. + + snmp_incoming_address is used for the SNMP socket receiving + messages from SNMP agents. + snmp_outgoing_address is used for SNMP packets returned to SNMP + agents. + + The default behaviour is to not bind to any specific address. + + NOTE, snmp_incoming_address and snmp_outgoing_address can not have + the same value since they both use port 3130. + +snmp_incoming_address 0.0.0.0 +snmp_outgoing_address 0.0.0.0 +DOC_END NAME: as_whois_server TYPE: string diff --git a/src/snmp_core.cc b/src/snmp_core.cc index edecfb9360..188b63a220 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -1,5 +1,5 @@ /* - * $Id: snmp_core.cc,v 1.7 1998/07/22 20:37:49 wessels Exp $ + * $Id: snmp_core.cc,v 1.8 1998/08/14 16:42:03 wessels Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Kostas Anagnostakis @@ -327,7 +327,7 @@ snmpConnectionOpen(void) commSetSelect(theInSnmpConnection, COMM_SELECT_READ, snmpHandleUdp, NULL, 0); debug(1, 1) ("Accepting SNMP messages on port %d, FD %d.\n", (int) port, theInSnmpConnection); - if ((addr = Config.Addrs.udp_outgoing).s_addr != no_addr.s_addr) { + if ((addr = Config.Addrs.snmp_outgoing).s_addr != no_addr.s_addr) { enter_suid(); theOutSnmpConnection = comm_open(SOCK_DGRAM, 0, diff --git a/src/structs.h b/src/structs.h index defff3eb37..f246283e3f 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.196 1998/08/14 09:22:41 wessels Exp $ + * $Id: structs.h,v 1.197 1998/08/14 16:42:04 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -307,8 +307,10 @@ struct _SquidConfig { struct in_addr tcp_outgoing; struct in_addr udp_incoming; struct in_addr udp_outgoing; +#if SQUID_SNMP struct in_addr snmp_incoming; struct in_addr snmp_outgoing; +#endif struct in_addr client_netmask; } Addrs; size_t tcpRcvBufsz;