summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2005-10-12 18:13:25 +0000
committermaxim <maxim@FreeBSD.org>2005-10-12 18:13:25 +0000
commit98442a62dc9bf9961724efa2315b04339bf37c41 (patch)
tree5dc73ed7b1f7f0bf963893e80422b95e0c3bdca6 /sys
parent5370b7c9a9a8b075983dd97ecb10605b8fab4262 (diff)
downloadFreeBSD-src-98442a62dc9bf9961724efa2315b04339bf37c41.zip
FreeBSD-src-98442a62dc9bf9961724efa2315b04339bf37c41.tar.gz
o INP_ONESBCAST is inpcb.inp_vflag flag not inp_flags. The confusion
with IP_PORTRANGE_HIGH leads to the incorrect checksum calculation. PR: kern/87306 Submitted by: Rickard Lind Reviewed by: bms MFC after: 2 weeks
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/raw_ip.c2
-rw-r--r--sys/netinet/udp_usrreq.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index fa14b8c..26e7c02 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -316,7 +316,7 @@ rip_output(struct mbuf *m, struct socket *so, u_long dst)
ipstat.ips_rawout++;
}
- if (inp->inp_flags & INP_ONESBCAST)
+ if (inp->inp_vflag & INP_ONESBCAST)
flags |= IP_SENDONES;
#ifdef MAC
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 1f53137..ca0cdb9 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -860,14 +860,14 @@ udp_output(inp, m, addr, control, td)
ipflags |= IP_ROUTETOIF;
if (inp->inp_socket->so_options & SO_BROADCAST)
ipflags |= IP_ALLOWBROADCAST;
- if (inp->inp_flags & INP_ONESBCAST)
+ if (inp->inp_vflag & INP_ONESBCAST)
ipflags |= IP_SENDONES;
/*
* Set up checksum and output datagram.
*/
if (udpcksum) {
- if (inp->inp_flags & INP_ONESBCAST)
+ if (inp->inp_vflag & INP_ONESBCAST)
faddr.s_addr = INADDR_BROADCAST;
ui->ui_sum = in_pseudo(ui->ui_src.s_addr, faddr.s_addr,
htons((u_short)len + sizeof(struct udphdr) + IPPROTO_UDP));
OpenPOWER on IntegriCloud