diff options
Diffstat (limited to 'sys/netinet/libalias/alias_util.c')
-rw-r--r-- | sys/netinet/libalias/alias_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/libalias/alias_util.c b/sys/netinet/libalias/alias_util.c index 4cdbaf8..805b51a 100644 --- a/sys/netinet/libalias/alias_util.c +++ b/sys/netinet/libalias/alias_util.c @@ -76,6 +76,7 @@ LibAliasInternetChecksum(struct libalias *la __unused, u_short * ptr, { int sum, oddbyte; + LIBALIAS_LOCK(la); sum = 0; while (nbytes > 1) { sum += *ptr++; @@ -89,6 +90,7 @@ LibAliasInternetChecksum(struct libalias *la __unused, u_short * ptr, } sum = (sum >> 16) + (sum & 0xffff); sum += (sum >> 16); + LIBALIAS_UNLOCK(la); return (~sum); } |