Segmentation fault for SNMP query

Milan Holub holub at thenet.ch
Fri Apr 13 13:05:24 CEST 2007


Hi Kevin,

On Thu, Apr 12, 2007 at 06:19:14PM -0400, Kevin Bonner wrote:
> > Try http://bugs.freeradius.org/show_bug.cgi?id=150
> >
> > I doubt that patch will still apply cleanly due to the many recent changes.
> > I'll see if I can test the CVS head later today and submit a newer patch.
> 
> It surprises me that it still applies cleanly (just offset) with the current 
> CVS head.  Feel free to test the patch and report results in the bug or on 
> the list.  It would be nice to see the bug squashed, but it's become a 
> default patch for my local freeradius build so I haven't been bothered with 
> the issue in a long time.
> 
> Kevin Bonner

==> I've applied the patch on cvs head. Here are the test results:

1) situation after start of freeradius(syslog output attached as well)

freeradius -X
...
Listening on SNMP SMUX with OID .1.3.6.1.4.1.3317.1.3.1
Ready to process requests.
Nothing to do.  Sleeping until we see a request.
SMUX read start
SMUX read len: 12
SMUX message received type: 67 rest len: 4
SMUX_RRSP
SMUX_RRSP value: 0 errstat: 0
Nothing to do.  Sleeping until we see a request.


tail -f /var/log/syslog
ucd-snmp[5234]: [smux_accept] accepted fd 3 from 127.0.0.1:39371
ucd-snmp[5234]: accepted smux peer: oid
enterprises.3317.1.3.1, password verysecret, descr radiusd


Then freeradius accepts and processes the snmp queries correctly until
the reload(either via HUP or snmp-write).
==> you can see the snmp client connections in syslog:
ucd-snmp[5234]: Connection from 127.0.0.1
for each request.

Unfortunately when the reload is performed the situation is following:
* syslog shows re-initilization of snmp upon reload:
tail -f /var/log/syslog
ucd-snmp[5234]: peer disconnected: enterprises.3317.1.3.1
ucd-snmp[5234]: [smux_accept] accepted fd 3from 127.0.0.1:39374
ucd-snmp[5234]: accepted smux peer: oid enterprises.3317.1.3.1, password verysecret, descr radiusd

* but when trying to snmpwalk freeradius does not response to query at all
and the snmp client times out:
`snmpwalk -Cc -v 1 -m /devel/freeradius/cvs/radiusd/mibs/RADIUS-AUTH-SERVER-MIB.txt -c verysecret localhost radiusAuthServUpTime.0`
Timeout: No Response from localhost

and the attempt is seen in syslog:
ucd-snmp[5234]: Connection from 127.0.0.1

To sum up: the patch applies to 2.0 but it does not work as expected:-(

If you have some ideas, then please advise.

> - 
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Milan Holub
holub (at) thenet (dot) ch

--------------------------------------
 TheNet-Internet Services AG,
 im Bernertechnopark, Morgenstr. 129
 CH-3018, Bern, Switzerland
 031 998 4333, Fax 031 998 4330
 http://www.thenet.ch
 http://wlan.thenet.ch
--------------------------------------



More information about the Freeradius-Users mailing list