From owner-cvs-all@FreeBSD.ORG Tue Jul 4 07:50:52 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E32B616A4DD; Tue, 4 Jul 2006 07:50:51 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7344243D7B; Tue, 4 Jul 2006 07:50:40 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost.int.ru [127.0.0.1] (may be forged)) by mp2.macomnet.net (8.13.7/8.13.3) with ESMTP id k647oXem020345; Tue, 4 Jul 2006 11:50:34 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Tue, 4 Jul 2006 11:50:29 +0400 (MSD) From: Maxim Konovalov To: Scott Ullrich In-Reply-To: Message-ID: <20060704114414.E20044@mp2.macomnet.net> References: <200605141422.k4EEMnmC056704@repoman.freebsd.org> <20060627015411.B30917@mp2.macomnet.net> <200606271416.29255.max@love2party.net> <20060704101945.J761@mp2.macomnet.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, dsh@vlink.ru, Max Laier , Bruce M Simpson Subject: Re: cvs commit: src/sys/netinet in.h ip_output.c ip_var.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2006 07:50:52 -0000 kOn Tue, 4 Jul 2006, 02:36-0400, Scott Ullrich wrote: > On 7/4/06, Maxim Konovalov wrote: > > How to repeat? Btw allr, lockedvnods etc are not needed there. "bt > > full" is. > > # ifconfig pfsync0 > pfsync0: flags=0<> mtu 2020 > syncpeer: 224.0.0.240 maxupd: 128 > # ifconfig pfsync0 syncdev lo0 > 0> > Fatal trap 12: page fault while in kernel mode [...] That's enough, thanks! It seems the same patch for if_pfsync.c solves the problem. The whole patch is: Index: netinet/ip_carp.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/ip_carp.c,v retrieving revision 1.40 diff -u -p -r1.40 ip_carp.c --- netinet/ip_carp.c 2 Jun 2006 19:59:33 -0000 1.40 +++ netinet/ip_carp.c 4 Jul 2006 07:05:26 -0000 @@ -375,6 +375,10 @@ carp_clone_create(struct if_clone *ifc, #ifdef INET6 sc->sc_im6o.im6o_multicast_hlim = CARP_DFLTTL; #endif + sc->sc_imo.imo_membership = (struct in_multi **)malloc( + (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP, + M_WAITOK); + sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS; callout_init(&sc->sc_ad_tmo, NET_CALLOUT_MPSAFE); callout_init(&sc->sc_md_tmo, NET_CALLOUT_MPSAFE); @@ -415,6 +419,7 @@ carp_clone_destroy(struct ifnet *ifp) bpfdetach(ifp); if_detach(ifp); if_free_type(ifp, IFT_ETHER); + free(sc->sc_imo.imo_membership, M_CARP); free(sc, M_CARP); } Index: contrib/pf/net/if_pfsync.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/pf/net/if_pfsync.c,v retrieving revision 1.28 diff -u -p -r1.28 if_pfsync.c --- contrib/pf/net/if_pfsync.c 16 Jun 2006 10:25:06 -0000 1.28 +++ contrib/pf/net/if_pfsync.c 4 Jul 2006 07:46:29 -0000 @@ -200,6 +200,7 @@ pfsync_clone_destroy(struct ifnet *ifp) if_detach(ifp); if_free(ifp); LIST_REMOVE(sc, sc_next); + free(sc->sc_imo.imo_membership, M_PFSYNC); free(sc, M_PFSYNC); } @@ -227,6 +228,10 @@ pfsync_clone_create(struct if_clone *ifc sc->sc_sendaddr.s_addr = htonl(INADDR_PFSYNC_GROUP); sc->sc_ureq_received = 0; sc->sc_ureq_sent = 0; + sc->sc_imo.imo_membership =(struct in_multi **)malloc( + (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_PFSYNC, + M_WAITOK); + sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS; ifp = SCP2IFP(sc); if_initname(ifp, ifc->ifc_name, unit); %%% I never used carp(4) so I can't check it works. It would be nice to commit a diff below too: Index: contrib/pf/man/pfsync.4 =================================================================== RCS file: /home/ncvs/src/contrib/pf/man/pfsync.4,v retrieving revision 1.9 diff -u -p -r1.9 pfsync.4 --- contrib/pf/man/pfsync.4 6 Jun 2006 12:35:53 -0000 1.9 +++ contrib/pf/man/pfsync.4 4 Jul 2006 07:49:02 -0000 @@ -33,6 +33,7 @@ .Nm pfsync .Nd packet filter state table logging interface .Sh SYNOPSIS +.Cd "device pf" .Cd "device pfsync" .Sh DESCRIPTION The %%% -- Maxim Konovalov