Make sure the sin_zero fields are filled.

This commit is contained in:
mycroft 1996-09-16 17:45:17 +00:00
parent 6dbfdb34f7
commit 457b1b1333
2 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: raw_ip.c,v 1.33 1996/09/15 18:11:08 mycroft Exp $ */ /* $NetBSD: raw_ip.c,v 1.34 1996/09/16 17:45:17 mycroft Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1988, 1993 * Copyright (c) 1982, 1986, 1988, 1993
@ -106,6 +106,8 @@ rip_input(m, va_alist)
ripsrc.sin_family = AF_INET; ripsrc.sin_family = AF_INET;
ripsrc.sin_len = sizeof(struct sockaddr_in); ripsrc.sin_len = sizeof(struct sockaddr_in);
ripsrc.sin_addr = ip->ip_src; ripsrc.sin_addr = ip->ip_src;
ripsrc.sin_port = 0;
bzero((caddr_t)ripsrc.sin_zero, sizeof(ripsrc.sin_zero));
for (inp = rawcbtable.inpt_queue.cqh_first; for (inp = rawcbtable.inpt_queue.cqh_first;
inp != (struct inpcb *)&rawcbtable.inpt_queue; inp != (struct inpcb *)&rawcbtable.inpt_queue;

View File

@ -1,4 +1,4 @@
/* $NetBSD: udp_usrreq.c,v 1.35 1996/09/15 18:11:11 mycroft Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.36 1996/09/16 17:45:19 mycroft Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1988, 1990, 1993 * Copyright (c) 1982, 1986, 1988, 1990, 1993
@ -195,8 +195,9 @@ udp_input(m, va_alist)
*/ */
udpsrc.sin_family = AF_INET; udpsrc.sin_family = AF_INET;
udpsrc.sin_len = sizeof(struct sockaddr_in); udpsrc.sin_len = sizeof(struct sockaddr_in);
udpsrc.sin_port = uh->uh_sport;
udpsrc.sin_addr = ip->ip_src; udpsrc.sin_addr = ip->ip_src;
udpsrc.sin_port = uh->uh_sport;
bzero((caddr_t)udpsrc.sin_zero, sizeof(udpsrc.sin_zero));
m->m_len -= sizeof (struct udpiphdr); m->m_len -= sizeof (struct udpiphdr);
m->m_data += sizeof (struct udpiphdr); m->m_data += sizeof (struct udpiphdr);
@ -290,8 +291,9 @@ udp_input(m, va_alist)
*/ */
udpsrc.sin_family = AF_INET; udpsrc.sin_family = AF_INET;
udpsrc.sin_len = sizeof(struct sockaddr_in); udpsrc.sin_len = sizeof(struct sockaddr_in);
udpsrc.sin_port = uh->uh_sport;
udpsrc.sin_addr = ip->ip_src; udpsrc.sin_addr = ip->ip_src;
udpsrc.sin_port = uh->uh_sport;
bzero((caddr_t)udpsrc.sin_zero, sizeof(udpsrc.sin_zero));
if (inp->inp_flags & INP_CONTROLOPTS) { if (inp->inp_flags & INP_CONTROLOPTS) {
struct mbuf **mp = &opts; struct mbuf **mp = &opts;