summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1999-02-08 08:33:38 +0000
committerJulian Elischer <julian@FreeBSD.org>1999-02-08 08:33:38 +0000
commit76f7d6a36a264977bb43f3720895142f06f89b5c (patch)
tree58899751674c71cafd45a3400b8c9f9f5c354061 /sys/netinet
parentb947e894eb97141bd47ebcda8856c56f63cdbb25 (diff)
Notes
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_divert.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index b39948e9c66c7..4d5f15589eaf4 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ip_divert.c,v 1.34 1998/07/06 09:06:58 julian Exp $
+ * $Id: ip_divert.c,v 1.37 1999/02/08 05:53:39 julian Exp $
*/
#include "opt_inet.h"
@@ -313,6 +313,14 @@ div_output(so, m, addr, control)
/* If no luck with the name above. check by IP address. */
if (m->m_pkthdr.rcvif == NULL) {
+ /*
+ * Make sure there are no distractions
+ * for ifa_ifwithaddr. Clear the port and the ifname.
+ * Maybe zap all 8 bytes at once using a 64bit write?
+ */
+ bzero(sin->sin_zero, sizeof(sin->sin_zero));
+ /* *((u_int64_t *)sin->sin_zero) = 0; */ /* XXX ?? */
+ sin->sin_port = 0;
if (!(ifa = ifa_ifwithaddr((struct sockaddr *) sin))) {
error = EADDRNOTAVAIL;
goto cantsend;