Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2017 08:36:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        pf@FreeBSD.org
Subject:   [Bug 223208] [pf] pf.conf syntax (:peer) rules load incorrectly
Message-ID:  <bug-223208-16861-TXCf5tCF9a@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-223208-16861@https.bugs.freebsd.org/bugzilla/>
References:  <bug-223208-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=3D223208

--- Comment #11 from Kristof Provost <kp@freebsd.org> ---
(In reply to Kristof Provost from comment #10)
Can you try this one instead?

diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 5652845d419..64015c7894b 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -4390,8 +4390,11 @@ route_host       : STRING                        {
                        $$->tail =3D $$;
                }
                | '(' STRING host ')'           {
+                       struct node_host *n;
+
                        $$ =3D $3;
-                       $$->ifname =3D $2;
+                       for (n =3D $3; n !=3D NULL; n =3D n->next)
+                               n->ifname =3D strdup($2);
                }
                ;


The route_host parsing code set the interface name, but only for the first
node_host in the list. If that one happened to be the inet6 address (given =
an
inet rule) it'd get removed by remove_invalid_hosts() later on, and we'd ha=
ve
no interface name.

--=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-223208-16861-TXCf5tCF9a>