From: acinonyx Date: Sun, 12 Jul 2009 15:37:48 +0000 (+0000) Subject: [packages] net-snmp: Enable UDP IPv6 transport (closes #5338) X-Git-Url: https://git.archive.openwrt.org/?a=commitdiff_plain;h=09e52cc3c8a6df0c33b66d46419d754ef2662523;p=packages.git [packages] net-snmp: Enable UDP IPv6 transport (closes #5338) git-svn-id: svn://svn.openwrt.org/openwrt/packages@16812 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/libs/net-snmp/Makefile b/libs/net-snmp/Makefile index e0322b679..2c374ddc7 100644 --- a/libs/net-snmp/Makefile +++ b/libs/net-snmp/Makefile @@ -141,15 +141,16 @@ SNMP_MIB_MODULES_EXCLUDED = \ udp-mib \ utilities \ -SNMP_TRANSPORTS_INCLUDED = Callback UDP +SNMP_TRANSPORTS_INCLUDED = Callback UDP UDPIPv6 -SNMP_TRANSPORTS_EXCLUDED = TCP TCPv6 UDPv6 Unix +SNMP_TRANSPORTS_EXCLUDED = TCP TCPIPv6 Unix TARGET_CFLAGS += $(FPIC) CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ + --enable-ipv6 \ --with-endianness=little \ --with-logfile=/var/log/snmpd.log \ --with-persistent-directory=/usr/lib/snmp/ \ @@ -158,7 +159,6 @@ CONFIGURE_ARGS += \ --with-sys-location=Unknown \ --enable-applications \ --disable-debugging \ - --disable-ipv6 \ --disable-manuals \ --disable-mibs \ --disable-scripts \ diff --git a/libs/net-snmp/files/snmpd.conf b/libs/net-snmp/files/snmpd.conf index 2b3cdf01e..099500784 100644 --- a/libs/net-snmp/files/snmpd.conf +++ b/libs/net-snmp/files/snmpd.conf @@ -1,3 +1,6 @@ +config agent + option agentaddress UDP:161 + config com2sec public option secname ro option source default diff --git a/libs/net-snmp/files/snmpd.init b/libs/net-snmp/files/snmpd.init index ce0490293..24291fc31 100644 --- a/libs/net-snmp/files/snmpd.init +++ b/libs/net-snmp/files/snmpd.init @@ -9,6 +9,13 @@ RUN_D=/var/run PID_F=$RUN_D/snmpd.pid RUN_C=$RUN_D/snmpd.conf +snmpd_agent_add() { + local cfg="$1" + + config_get agentaddress "$cfg" agentaddress + [ -n "$agentaddress" ] || return 0 + echo "agentaddress $agentaddress" >> $RUN_C +} snmpd_system_add() { local cfg="$1" config_get syslocation "$cfg" sysLocation @@ -110,6 +117,7 @@ start() { config_load snmpd + config_foreach snmpd_agent_add agent config_foreach snmpd_system_add system config_foreach snmpd_com2sec_add com2sec config_foreach snmpd_group_add group