Fix a potential crash that could occur when CARP_LOG is being used.

Obtained from:	OpenBSD (pat)
This commit is contained in:
Gleb Smirnoff 2005-03-18 13:18:34 +00:00
parent 8b0bf216d6
commit 9860bab349

View File

@ -579,8 +579,7 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
IP6_EXTHDR_GET(ch, struct carp_header *, m, *offp, sizeof(*ch));
if (ch == NULL) {
carpstats.carps_badlen++;
CARP_LOG("carp6_input: packet size %u too small on %s\n", len,
m->m_pkthdr.rcvif->if_xname);
CARP_LOG("carp6_input: packet size %u too small\n", len);
return (IPPROTO_DONE);
}