diff options
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 9fe7001..baaf332 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -211,7 +211,7 @@ ip_output(m0, opt, ro, flags, imo) if ((flags & (IP_FORWARDING|IP_RAWOUTPUT)) == 0) { ip->ip_vhl = IP_MAKE_VHL(IPVERSION, hlen >> 2); ip->ip_off &= IP_DF; - ip->ip_id = ip_id++; + ip->ip_id = htons(ip_id++); ipstat.ips_localout++; } else { hlen = IP_VHL_HL(ip->ip_vhl) << 2; @@ -520,7 +520,6 @@ sendit: /* Restore packet header fields to original values */ HTONS(ip->ip_len); - HTONS(ip->ip_id); HTONS(ip->ip_off); /* Deliver packet to divert input routine */ @@ -595,7 +594,6 @@ sendit: m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | CSUM_IP_VALID; HTONS(ip->ip_len); - HTONS(ip->ip_id); HTONS(ip->ip_off); ip_input(m); goto done; @@ -715,7 +713,6 @@ pass: } HTONS(ip->ip_len); - HTONS(ip->ip_id); HTONS(ip->ip_off); error = ipsec4_output(&state, sp, flags); @@ -776,7 +773,6 @@ pass: /* make it flipped, again. */ NTOHS(ip->ip_len); - NTOHS(ip->ip_id); NTOHS(ip->ip_off); skip_ipsec: #endif /*IPSEC*/ @@ -796,7 +792,6 @@ skip_ipsec: if ((u_short)ip->ip_len <= ifp->if_mtu || ifp->if_hwassist & CSUM_FRAGMENT) { HTONS(ip->ip_len); - HTONS(ip->ip_id); HTONS(ip->ip_off); ip->ip_sum = 0; if (sw_csum & CSUM_DELAY_IP) { @@ -892,7 +887,6 @@ skip_ipsec: m->m_pkthdr.len = mhlen + len; m->m_pkthdr.rcvif = (struct ifnet *)0; m->m_pkthdr.csum_flags = m0->m_pkthdr.csum_flags; - HTONS(mhip->ip_id); HTONS(mhip->ip_off); mhip->ip_sum = 0; if (sw_csum & CSUM_DELAY_IP) { @@ -921,7 +915,6 @@ skip_ipsec: m_adj(m, hlen + firstlen - (u_short)ip->ip_len); m->m_pkthdr.len = hlen + firstlen; ip->ip_len = htons((u_short)m->m_pkthdr.len); - HTONS(ip->ip_id); ip->ip_off |= IP_MF; HTONS(ip->ip_off); ip->ip_sum = 0; @@ -1864,7 +1857,6 @@ ip_mloopback(ifp, m, dst, hlen) */ ip = mtod(copym, struct ip *); HTONS(ip->ip_len); - HTONS(ip->ip_id); HTONS(ip->ip_off); ip->ip_sum = 0; if (ip->ip_vhl == IP_VHL_BORING) { |