aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_divert.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index b39948e9c66c..9a709e5b51dc 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.35 1998/12/04 22:54:53 archie Exp $
*/
#include "opt_inet.h"
@@ -313,6 +313,15 @@ 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;
+ *zp = 0;
if (!(ifa = ifa_ifwithaddr((struct sockaddr *) sin))) {
error = EADDRNOTAVAIL;
goto cantsend;