Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jun 2018 12:37:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        pf@FreeBSD.org
Subject:   [Bug 229092] [pf] [pfsync] States created by route-to rules pfsynced without interface
Message-ID:  <bug-229092-16861-qnyI39UoV1@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-229092-16861@https.bugs.freebsd.org/bugzilla/>
References:  <bug-229092-16861@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229092

--- Comment #3 from Kajetan Staszkiewicz <vegeta@tuxpowered.net> ---
I found another bug: states synced during initial bulk update are considere=
d to
come from incompatible ruleset, even if ruleset *is* compatible. I also must
raise a question why the initial sync is "update" and not "insert".


--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -874,21 +874,21 @@ pfsync_in_upd(struct pfsync_pkt *pkt, struct mbuf *m,=
 int
offset, int count)
                                printf("pfsync_input: PFSYNC_ACT_UPD: "
                                    "invalid value\n");
                        }
                        V_pfsyncstats.pfsyncs_badval++;
                        continue;
                }

                st =3D pf_find_state_byid(sp->id, sp->creatorid);
                if (st =3D=3D NULL) {
                        /* insert the update */
-                       if (pfsync_state_import(sp, 0))
+                       if (pfsync_state_import(sp, pkt->flags))
                                V_pfsyncstats.pfsyncs_badstate++;
                        continue;
                }

                if (st->state_flags & PFSTATE_ACK) {
                        PFSYNC_LOCK(sc);
                        pfsync_undefer_state(st, 1);
                        PFSYNC_UNLOCK(sc);
                }



This bug is fixed in OpenBSD some time ago:
https://github.com/openbsd/src/commit/ddb7828bc6708358e6c08caaf09e3524e8cab=
7b4

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229092-16861-qnyI39UoV1>