Reduce diffs against KAME. No functional change.

Obtained from:	KAME
This commit is contained in:
Hajimu UMEMOTO 2003-09-30 09:06:58 +00:00
parent fa3f9daae5
commit a7012295b4
2 changed files with 4 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/* $FreeBSD$ */
/* $KAME: key_debug.h,v 1.10 2001/08/05 08:37:52 itojun Exp $ */
/* $KAME: key_debug.h,v 1.11 2002/11/05 03:48:34 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.

View File

@ -286,15 +286,11 @@ key_sendup_mbuf(so, m, target)
pfkeystat.in_total++;
pfkeystat.in_bytes += m->m_pkthdr.len;
if (m->m_len < sizeof(struct sadb_msg)) {
#if 1
m = m_pullup(m, sizeof(struct sadb_msg));
if (m == NULL) {
pfkeystat.in_nomem++;
return ENOBUFS;
}
#else
/* don't bother pulling it up just for stats */
#endif
}
if (m->m_len >= sizeof(struct sadb_msg)) {
struct sadb_msg *msg;
@ -302,12 +298,11 @@ key_sendup_mbuf(so, m, target)
pfkeystat.in_msgtype[msg->sadb_msg_type]++;
}
LIST_FOREACH(rp, &rawcb_list, list)
{
LIST_FOREACH(rp, &rawcb_list, list) {
if (rp->rcb_proto.sp_family != PF_KEY)
continue;
if (rp->rcb_proto.sp_protocol
&& rp->rcb_proto.sp_protocol != PF_KEY_V2) {
if (rp->rcb_proto.sp_protocol &&
rp->rcb_proto.sp_protocol != PF_KEY_V2) {
continue;
}