diff options
| author | mycroft <mycroft@NetBSD.org> | 1999-01-19 21:58:40 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 1999-01-19 21:58:40 +0000 |
| commit | fc1211a6abd377660b11181cd45ea0ff3f4fd136 (patch) | |
| tree | 31f452e89e238d70a25eae827d4b76e6e6ccfded /sys | |
| parent | bef0af53111a63eff076a98619fa750d19ced51b (diff) | |
Don't overwrite the checksum fields when checking them. There's no reason to
do this, and it screws up ICMP replies.
XXX The returned IP checksum and length are still wrong.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/netinet/ip_input.c | 4 | ||||
| -rw-r--r-- | sys/netinet/tcp_input.c | 4 | ||||
| -rw-r--r-- | sys/netinet/udp_usrreq.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 088ac419d86..821433e3a39 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.77 1999/01/11 22:35:06 thorpej Exp $ */ +/* $NetBSD: ip_input.c,v 1.78 1999/01/19 21:58:40 mycroft Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -340,7 +340,7 @@ next: } ip = mtod(m, struct ip *); } - if ((ip->ip_sum = in_cksum(m, hlen)) != 0) { + if (in_cksum(m, hlen) != 0) { ipstat.ips_badsum++; goto bad; } diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index db659e082ae..d2b6e745493 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.72 1998/12/18 21:38:02 thorpej Exp $ */ +/* $NetBSD: tcp_input.c,v 1.73 1999/01/19 21:58:41 mycroft Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -486,7 +486,7 @@ tcp_input(m, va_alist) bzero(ti->ti_x1, sizeof ti->ti_x1); ti->ti_len = (u_int16_t)tlen; HTONS(ti->ti_len); - if ((ti->ti_sum = in_cksum(m, len)) != 0) { + if (in_cksum(m, len) != 0) { tcpstat.tcps_rcvbadsum++; goto drop; } diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 398bdda98a7..be324d1cf2a 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.45 1999/01/11 22:35:07 thorpej Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.46 1999/01/19 21:58:41 mycroft Exp $ */ /* * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 @@ -164,7 +164,7 @@ udp_input(m, va_alist) bzero(((struct ipovly *)ip)->ih_x1, sizeof ((struct ipovly *)ip)->ih_x1); ((struct ipovly *)ip)->ih_len = uh->uh_ulen; - if ((uh->uh_sum = in_cksum(m, len + sizeof (struct ip))) != 0) { + if (in_cksum(m, len + sizeof (struct ip)) != 0) { udpstat.udps_badsum++; m_freem(m); return; |
