summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-10-20 14:10:37 +0000
committerru <ru@FreeBSD.org>2000-10-20 14:10:37 +0000
commit7e387c1f6a34e4d678df5f1ab4f80cbb9c792de7 (patch)
treea2231955e9e1dae64b10c89434d83f0f77d3a5db /sys/netinet/ip_output.c
parent2ee7f81b57cec4fab17cbac17d9eb944e5c3653e (diff)
downloadFreeBSD-src-7e387c1f6a34e4d678df5f1ab4f80cbb9c792de7.zip
FreeBSD-src-7e387c1f6a34e4d678df5f1ab4f80cbb9c792de7.tar.gz
Save a few CPU cycles in IP fragmentation code.
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index cbf7129..7c166b7 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -876,9 +876,7 @@ skip_ipsec:
mhip->ip_vhl = IP_MAKE_VHL(IPVERSION, mhlen >> 2);
}
m->m_len = mhlen;
- mhip->ip_off = ((off - hlen) >> 3) + (ip->ip_off & ~IP_MF);
- if (ip->ip_off & IP_MF)
- mhip->ip_off |= IP_MF;
+ mhip->ip_off = ((off - hlen) >> 3) + ip->ip_off;
if (off + len >= (u_short)ip->ip_len)
len = (u_short)ip->ip_len - off;
else
OpenPOWER on IntegriCloud