diff options
author | glebius <glebius@FreeBSD.org> | 2012-12-25 14:29:38 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-12-25 14:29:38 +0000 |
commit | ddd09f2a269f1c2be1177b3d360fa2f844c0bc70 (patch) | |
tree | c569381bd6da048e6f04c8618b3103467413aba9 /sys/netinet/ip_carp.c | |
parent | da771ef7de845c8c8a2c112aa2c3a4f225bf64ff (diff) | |
download | FreeBSD-src-ddd09f2a269f1c2be1177b3d360fa2f844c0bc70.zip FreeBSD-src-ddd09f2a269f1c2be1177b3d360fa2f844c0bc70.tar.gz |
Garbage collect carp_cksum().
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 7afe1af..ac6b043 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -290,12 +290,6 @@ static struct mtx carp_mtx; static struct task carp_sendall_task = TASK_INITIALIZER(0, carp_send_ad_all, NULL); -static __inline uint16_t -carp_cksum(struct mbuf *m, int len) -{ - return (in_cksum(m, len)); -} - static void carp_hmac_prepare(struct carp_softc *sc) { @@ -478,7 +472,7 @@ carp_input(struct mbuf *m, int hlen) /* verify the CARP checksum */ m->m_data += iplen; - if (carp_cksum(m, len - iplen)) { + if (in_cksum(m, len - iplen)) { CARPSTATS_INC(carps_badsum); CARP_DEBUG("%s: checksum failed on %s\n", __func__, m->m_pkthdr.rcvif->if_xname); @@ -537,7 +531,7 @@ carp6_input(struct mbuf **mp, int *offp, int proto) /* verify the CARP checksum */ m->m_data += *offp; - if (carp_cksum(m, sizeof(*ch))) { + if (in_cksum(m, sizeof(*ch))) { CARPSTATS_INC(carps_badsum); CARP_DEBUG("%s: checksum failed, on %s\n", __func__, m->m_pkthdr.rcvif->if_xname); @@ -809,7 +803,7 @@ carp_send_ad_locked(struct carp_softc *sc) goto resched; m->m_data += sizeof(*ip); - ch_ptr->carp_cksum = carp_cksum(m, len - sizeof(*ip)); + ch_ptr->carp_cksum = in_cksum(m, len - sizeof(*ip)); m->m_data -= sizeof(*ip); CARPSTATS_INC(carps_opackets); @@ -882,7 +876,7 @@ carp_send_ad_locked(struct carp_softc *sc) goto resched; m->m_data += sizeof(*ip6); - ch_ptr->carp_cksum = carp_cksum(m, len - sizeof(*ip6)); + ch_ptr->carp_cksum = in_cksum(m, len - sizeof(*ip6)); m->m_data -= sizeof(*ip6); CARPSTATS_INC(carps_opackets6); |