Make comments more clear. Change the order of one if() statement to check the

more likely variable first.
This commit is contained in:
Andre Oppermann 2004-10-19 14:31:56 +00:00
parent f45cd79a03
commit de1c2ac4bf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136690

View File

@ -241,6 +241,10 @@ ip_fastforward(struct mbuf *m)
ipstat.ips_badsum++;
goto drop;
}
/*
* Remeber that we have checked the IP header and found it valid.
*/
m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID);
ip_len = ntohs(ip->ip_len);
@ -408,8 +412,9 @@ ip_fastforward(struct mbuf *m)
}
/*
* Decrement the TTL and incrementally change the checksum.
* Don't bother doing this with hw checksum offloading.
* Decrement the TTL and incrementally change the IP header checksum.
* Don't bother doing this with hw checksum offloading, it's faster
* doing it right here.
*/
ip->ip_ttl -= IPTTLDEC;
if (ip->ip_sum >= (u_int16_t) ~htons(IPTTLDEC << 8))
@ -462,7 +467,7 @@ ip_fastforward(struct mbuf *m)
#ifndef IPFIREWALL_FORWARD
if (in_localip(dest)) {
#else
if (in_localip(dest) || m->m_flags & M_FASTFWD_OURS) {
if (m->m_flags & M_FASTFWD_OURS || in_localip(dest)) {
#endif /* IPFIREWALL_FORWARD */
forwardlocal:
/*