net-snmp/net-snmp-5.5-missing-bcast.patch

28 lines
1.2 KiB
Diff

544849 - snmpd segfaults when openvpn is running
Source: upstream, svn rev. 17931
Clear the bcastentry in every loop iteration. If not cleared, the bcastentry
might be insterted into the container twice, when processing an interface
without broadcast address (like OpenVPN's tun0).
diff -up net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c.new net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c
--- net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c.new 2009-05-06 23:59:20.000000000 +0200
+++ net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c 2009-12-21 15:58:02.000000000 +0100
@@ -135,7 +135,6 @@ _netsnmp_ioctl_ipaddress_container_load_
struct ifreq *ifrp;
struct sockaddr save_addr;
struct sockaddr_in * si;
- netsnmp_ipaddress_entry *entry, *bcastentry = NULL;
struct address_flag_info addr_info;
in_addr_t ipval;
_ioctl_extras *extras;
@@ -156,6 +155,7 @@ _netsnmp_ioctl_ipaddress_container_load_
ifrp = ifc.ifc_req;
for(i=0; i < interfaces; ++i, ++ifrp) {
+ netsnmp_ipaddress_entry *entry, *bcastentry = NULL;
DEBUGMSGTL(("access:ipaddress:container",
" interface %d, %s\n", i, ifrp->ifr_name));