Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 2004 10:39:09 +0900
From:      "George V. Neville-Neil" <gnn@neville-neil.com>
To:        snap-users@kame.net
Cc:        rwatson@freebsd.org
Subject:   Patch for fragment problem in key.c
Message-ID:  <m2oejrjhoi.wl@minion.local.neville-neil.com>

next in thread | raw e-mail | index | archive | help
Hi Folks,

	Robert Watson tried to send email about this but it never got
	through, and then Sam Leffler got ahold of me and told me he
	fixed something similar in the FAST_IPSEC code.  So, the
	following patch fixes, in KAME IPSec.  This patch was
	generated against 6.0-CURRENT and I included Sam's commit
	message.

Later,
George

Correct handling of SADB_UPDATE and SADB_ADD requests.  key_align may split
the mbuf due to use of m_pulldown.  Discarding the result because of this
does not make sense as no subsequent code depends on the entire msg being
linearized (only the individual pieces).  It's likely something else is wrong
here but for now this appears to get things back to a working state.

Index: sys/netkey/key.c
===================================================================
RCS file: /Volumes/exported/FreeBSD-CVS/src/sys/netkey/key.c,v
retrieving revision 1.67
diff -u -r1.67 key.c
--- sys/netkey/key.c	2 Sep 2004 20:14:03 -0000	1.67
+++ sys/netkey/key.c	27 Sep 2004 16:08:31 -0000
@@ -6952,11 +6952,6 @@
 	if (error)
 		return error;
 
-	if (m->m_next) {	/*XXX*/
-		m_freem(m);
-		return ENOBUFS;
-	}
-
 	msg = mh.msg;
 
 	/* check SA type */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m2oejrjhoi.wl>