Date: Tue, 4 Jul 2006 11:50:29 +0400 (MSD) From: Maxim Konovalov <maxim@macomnet.ru> To: Scott Ullrich <sullrich@gmail.com> Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, dsh@vlink.ru, Max Laier <max@love2party.net>, Bruce M Simpson <bms@FreeBSD.org> Subject: Re: cvs commit: src/sys/netinet in.h ip_output.c ip_var.h Message-ID: <20060704114414.E20044@mp2.macomnet.net> In-Reply-To: <d5992baf0607032336p17798c0bm79230216efdcdb95@mail.gmail.com> References: <200605141422.k4EEMnmC056704@repoman.freebsd.org> <20060627015411.B30917@mp2.macomnet.net> <200606271416.29255.max@love2party.net> <d5992baf0607031750m41407194ufadcdaf1b0baa75a@mail.gmail.com> <20060704101945.J761@mp2.macomnet.net> <d5992baf0607032336p17798c0bm79230216efdcdb95@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
kOn Tue, 4 Jul 2006, 02:36-0400, Scott Ullrich wrote:
> On 7/4/06, Maxim Konovalov <maxim@macomnet.ru> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060704114414.E20044>
