]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r310655:
authorngie <ngie@FreeBSD.org>
Mon, 16 Jan 2017 07:03:33 +0000 (07:03 +0000)
committerngie <ngie@FreeBSD.org>
Mon, 16 Jan 2017 07:03:33 +0000 (07:03 +0000)
commit9e7f08fdcf999fe8b9562ce4e417276353b32093
tree5e6ede87d5f2f069b000fa1263988a34b62d438c
parent34667460f5d08c2dc59e0ce931a1089be4644803
MFC r310655:

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(..).

Obtained from:  Isilon OneFS (^/onefs/branches/BR_8_0_0_DEV@r507595)
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