]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
For UDP transport set IP_RECVDSTADDR sockopt on the socket, and provide
authorGleb Smirnoff <glebius@FreeBSD.org>
Sun, 9 Sep 2012 09:46:48 +0000 (09:46 +0000)
committerGleb Smirnoff <glebius@FreeBSD.org>
Sun, 9 Sep 2012 09:46:48 +0000 (09:46 +0000)
commitf2ddd22eacdbc3262f55edab8aae5b6fcebd888c
tree893f8dc9388640443e9ed63e9a469dfd114072bc
parent64dd8b7554d93b38639f1a9e3937391020c77821
For UDP transport set IP_RECVDSTADDR sockopt on the socket, and provide
IP_SENDSRCADDR control with datagram message we reply with. This makes
bsnmpd reply from exactly same address that request was sent to, thus
successfully bypassing stateful firewalls or other kinds of strict checking.

PR: bin/171279
contrib/bsnmp/snmpd/main.c
contrib/bsnmp/snmpd/trans_udp.c