From owner-freebsd-pf@FreeBSD.ORG Wed May 4 13:26:54 2005 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F11DE16A4CF for ; Wed, 4 May 2005 13:26:54 +0000 (GMT) Received: from host130-93.pool8019.interbusiness.it (host130-93.pool8019.interbusiness.it [80.19.93.130]) by mx1.FreeBSD.org (Postfix) with SMTP id 739A243D78 for ; Wed, 4 May 2005 13:26:53 +0000 (GMT) (envelope-from pierguido.lambri@lugpiacenza.org) Message-ID: <4278CF8F.3030105@lugpiacenza.org> Date: Wed, 04 May 2005 15:35:11 +0200 From: pier MIME-Version: 1.0 To: freebsd-pf@freebsd.org References: <4278C045.9050802@lugpiacenza.org> In-Reply-To: <4278C045.9050802@lugpiacenza.org> Content-Type: multipart/mixed; boundary="------------050106000005050708050209" X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: Pf patch X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical discussion and general questions about packet filter (pf) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2005 13:26:55 -0000 This is a multi-part message in MIME format. --------------050106000005050708050209 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 pier wrote: > hi all. > I'm trying to apply the patch for pf3.7. > It compile everything until comes to pfsync > It gives me this error: > > > cc -O -pipe -march=pentiumpro -DUSE_IF_MEDIA -DINET6 -DUSE_VLANS > -DUSE_IEEE80211 -DUSE_CARP -DUSE_MAC -DUSE_PFSYNC -DNS -Wall > -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs -I.. [...] Now i'm noticed these rejects: Patching file ifpfsync.c using Plan A... Hunk #1 succeeded at 35. Hunk #2 failed at 46. Hunk #3 succeeded at 60 (offset -5 lines). Hunk #4 succeeded at 78 (offset -5 lines). Hunk #5 failed at 168. 2 out of 5 hunks failed--saving rejects to ifpfsync.c.rej done Patching file ifpfsync.c using Plan A... Reversed (or previously applied) patch detected! Assume -R? [y] y Hunk #1 succeeded at 35. Hunk #2 failed at 45. Hunk #3 succeeded at 55. Hunk #4 succeeded at 72. Hunk #5 failed at 109. 2 out of 5 hunks failed--saving rejects to ifpfsync.c.rej done I attach also the two rejects files Thanx Pier - -- Un uomo saggio impara dall' esperienza. Un uomo ancora pił saggio impara dall'esperienza degli altri -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCeM+P0EvuLV/O0yoRAtcRAKDpm/yOQDPIKzyGIpsewV6wYsp/ZgCg1BB6 BB74QWofHYwLE6qu4Wx9JRA= =obqz -----END PGP SIGNATURE----- --------------050106000005050708050209 Content-Type: text/plain; name="ifpfsync.c.rej.orig" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ifpfsync.c.rej.orig" *************** *** 44,56 **** #include "ifconfig.h" - void setpfsync_syncif(const char *, int, int, const struct afswtch *rafp); - void unsetpfsync_syncif(const char *, int, int, const struct afswtch *rafp); - void setpfsync_maxupd(const char *, int, int, const struct afswtch *rafp); void pfsync_status(int); void - setpfsync_syncif(const char *val, int d, int s, const struct afswtch *rafp) { struct pfsyncreq preq; --- 46,61 ---- #include "ifconfig.h" + void setpfsync_syncdev(const char *, int, int, const struct afswtch *); + void unsetpfsync_syncdev(const char *, int, int, const struct afswtch *); + void setpfsync_syncpeer(const char *, int, int, const struct afswtch *); + void unsetpfsync_syncpeer(const char *, int, int, const struct afswtch *); + void setpfsync_syncpeer(const char *, int, int, const struct afswtch *); + void setpfsync_maxupd(const char *, int, int, const struct afswtch *); void pfsync_status(int); void + setpfsync_syncdev(const char *val, int d, int s, const struct afswtch *rafp) { struct pfsyncreq preq; *************** *** 109,124 **** if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1) return; - if (preq.pfsyncr_syncif[0] != '\0') { - printf("\tpfsync: syncif: %s maxupd: %d\n", - preq.pfsyncr_syncif, preq.pfsyncr_maxupdates); } } static struct cmd pfsync_cmds[] = { - DEF_CMD_ARG("syncif", setpfsync_syncif), - DEF_CMD_ARG("maxupd", setpfsync_maxupd), - DEF_CMD("-syncif", 1, unsetpfsync_syncif), }; static struct afswtch af_pfsync = { .af_name = "af_pfsync", --- 168,190 ---- if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1) return; + if (preq.pfsyncr_syncdev[0] != '\0') { + printf("\tpfsync: syncdev: %s ", preq.pfsyncr_syncdev); + if (preq.pfsyncr_syncpeer.s_addr != INADDR_PFSYNC_GROUP) + printf("syncpeer: %s ", + inet_ntoa(preq.pfsyncr_syncpeer)); + printf("maxupd: %d\n", preq.pfsyncr_maxupdates); } } static struct cmd pfsync_cmds[] = { + DEF_CMD_ARG("syncdev", setpfsync_syncdev), + DEF_CMD("-syncdev", 1, unsetpfsync_syncdev), + DEF_CMD_ARG("syncif", setpfsync_syncdev), + DEF_CMD("-syncif", 1, unsetpfsync_syncdev), + DEF_CMD_ARG("syncpeer", setpfsync_syncpeer), + DEF_CMD("-syncpeer", 1, unsetpfsync_syncpeer), + DEF_CMD_ARG("maxupd", setpfsync_maxupd) }; static struct afswtch af_pfsync = { .af_name = "af_pfsync", --------------050106000005050708050209--