]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix bsnmpd sending/receiving with multi-homed configurations or INADDR_ANY used
authorEnji Cooper <ngie@FreeBSD.org>
Wed, 28 Dec 2016 04:29:09 +0000 (04:29 +0000)
committerEnji Cooper <ngie@FreeBSD.org>
Wed, 28 Dec 2016 04:29:09 +0000 (04:29 +0000)
commit8d7f605b6c744bbf454b92d88aee811c01c9594a
tree6327411bbd4d45ccd20179bee86ef58e5f7dfd73
parentf66b889d0015294ad5fb3d50187fa8517e118653
Fix bsnmpd sending/receiving with multi-homed configurations or INADDR_ANY used
as the listening address in snmpd_input(..)

Stash the IPv4 address of the receiver via the recv(..) callback and use it in
the send(..) callback for the transport by specifying IP_SENDSRCADDR for the
control message type.

Add sendmsg logic to the UDP transport's send(..) callback and use the
respective send(..) callback for the transport instead of calling sendto in
snmpd_input(..).

MFC after:      3 weeks
Obtained from:  Isilon OneFS (^/onefs/branches/BR_8_0_0_DEV@r507595)
Submitted by:   Thor Steingrimsson <thor.steingrimsson@isilon.com>
Sponsored by:   Dell EMC Isilon
contrib/bsnmp/snmpd/main.c
contrib/bsnmp/snmpd/snmpd.h
contrib/bsnmp/snmpd/trans_lsock.c
contrib/bsnmp/snmpd/trans_udp.c
contrib/bsnmp/snmpd/trans_udp.h