[Bug 217760] [patch] [bsnmpd] bsnmpd coredumps on first request

2017-03-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217760

Ngie Cooper  changed:

   What|Removed |Added

   Assignee|freebsd-bugs@FreeBSD.org|n...@freebsd.org

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 217760] [patch] [bsnmpd] bsnmpd coredumps on first request

2017-03-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217760

Eugene Grosbein  changed:

   What|Removed |Added

 Attachment #180780|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 217760] [patch] [bsnmpd] bsnmpd coredumps on first request

2017-03-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217760

--- Comment #1 from Eugene Grosbein  ---
Created attachment 180781
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=180781=edit
properly initialize port->transport

Better version of the same patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 217760] [patch] [bsnmpd] bsnmpd coredumps on first request

2017-03-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217760

Bug ID: 217760
   Summary: [patch] [bsnmpd] bsnmpd coredumps on first request
   Product: Base System
   Version: 11.0-STABLE
  Hardware: Any
OS: Any
Status: New
  Keywords: patch
  Severity: Affects Some People
  Priority: ---
 Component: bin
  Assignee: freebsd-bugs@FreeBSD.org
  Reporter: eu...@freebsd.org
  Keywords: patch

Created attachment 180780
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=180780=edit
properly initialize port->transport

One of my 11.0-STABLE systems starts bsnmpd just fine but first request crashes
it with sigsegv and core is generated.

#0  snmpd_input (pi=0x2861ce98, tport=0x2861cc80) at
/home/src/usr.sbin/bsnmpd/bsnmpd/../../../contrib/bsnmp/snmpd/main.c:1044
1044ret = tport->transport->vtab->recv(tport, pi);
(gdb) bt
#0  snmpd_input (pi=0x2861ce98, tport=0x2861cc80) at
/home/src/usr.sbin/bsnmpd/bsnmpd/../../../contrib/bsnmp/snmpd/main.c:1044
#1  0x0805f36c in udp_input (fd=8, udata=0x2861cc80) at
/home/src/usr.sbin/bsnmpd/bsnmpd/../../../contrib/bsnmp/snmpd/trans_udp.c:98
#2  0x0804e116 in input (fd=8, mask=1, uap=0x28621080) at
/home/src/usr.sbin/bsnmpd/bsnmpd/../../../contrib/bsnmp/snmpd/main.c:900
#3  0x2809b9a7 in poll_dispatch (wait=1) at
/home/src/contrib/libbegemot/rpoll.c:614
#4  0x0804f9c5 in main (argc=0, argv=0xbfbfee78) at
/home/src/usr.sbin/bsnmpd/bsnmpd/../../../contrib/bsnmp/snmpd/main.c:1714
Current language:  auto; currently minimal
(gdb) p tport->transport
$1 = (struct transport *) 0x0

On line patch fixing the problem is attached. The problem manifests when
bsnmpd.conf has several begemotSnmpdPortStatus.* lines for distinct IP
addresses and addresses are unsorted, for example:

# open standard SNMP ports
#begemotSnmpdPortStatus.0.0.0.0.161 = 1
begemotSnmpdPortStatus.[192.168.1.6].161 = 1
begemotSnmpdPortStatus.127.0.0.1.161 = 1

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"