diff options
author | 2011-04-04 13:57:29 +0000 | |
---|---|---|
committer | 2011-04-04 13:57:29 +0000 | |
commit | 0ac96d06e863a68b6a311e1d0258dec7a77ad3a3 (patch) | |
tree | 22a082527de44f1e9123f8895b2b713b18e82fb6 /sys/netinet/ip_output.c | |
parent | change an if statement to a switch to reduce eye bleedage (diff) | |
download | wireguard-openbsd-0ac96d06e863a68b6a311e1d0258dec7a77ad3a3.tar.xz wireguard-openbsd-0ac96d06e863a68b6a311e1d0258dec7a77ad3a3.zip |
there is no need to special case the bridge in the ip checksum handling
ok sthen claudio dlg
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 801a363d616..0a8f4ee1be9 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.214 2010/09/30 09:18:18 phessler Exp $ */ +/* $OpenBSD: ip_output.c,v 1.215 2011/04/04 13:57:29 henning Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -760,8 +760,7 @@ sendit: */ if (ntohs(ip->ip_len) <= mtu) { ip->ip_sum = 0; - if ((ifp->if_capabilities & IFCAP_CSUM_IPv4) && - ifp->if_bridge == NULL) { + if ((ifp->if_capabilities & IFCAP_CSUM_IPv4)) { m->m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT; ipstat.ips_outhwcsum++; } else @@ -911,8 +910,7 @@ ip_fragment(struct mbuf *m, struct ifnet *ifp, u_long mtu) mhip->ip_off = htons((u_int16_t)mhip->ip_off); mhip->ip_sum = 0; if ((ifp != NULL) && - (ifp->if_capabilities & IFCAP_CSUM_IPv4) && - ifp->if_bridge == NULL) { + (ifp->if_capabilities & IFCAP_CSUM_IPv4)) { m->m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT; ipstat.ips_outhwcsum++; } else @@ -931,8 +929,7 @@ ip_fragment(struct mbuf *m, struct ifnet *ifp, u_long mtu) ip->ip_off |= htons(IP_MF); ip->ip_sum = 0; if ((ifp != NULL) && - (ifp->if_capabilities & IFCAP_CSUM_IPv4) && - ifp->if_bridge == NULL) { + (ifp->if_capabilities & IFCAP_CSUM_IPv4)) { m->m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT; ipstat.ips_outhwcsum++; } else |