From 9ed45cbd118b37f001d2c609b0cb7b8b34d1ee9f Mon Sep 17 00:00:00 2001 From: arr Date: Tue, 6 Nov 2001 00:48:01 +0000 Subject: - Fixes non-zero'd out sin_zero field problem so that the padding is used as it is supposed to be. Inspired by: PR #31704 Approved by: jdp Reviewed by: jhb, -net@ --- sys/netinet/in_pcb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/netinet') diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 8c0109f..4ee4b0d 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -221,6 +221,7 @@ in_pcbbind(inp, nam, td) reuseport = SO_REUSEADDR|SO_REUSEPORT; } else if (sin->sin_addr.s_addr != INADDR_ANY) { sin->sin_port = 0; /* yech... */ + bzero(&sin->sin_zero, sizeof(sin->sin_zero)); if (ifa_ifwithaddr((struct sockaddr *)sin) == 0) return (EADDRNOTAVAIL); } -- cgit v1.1