From owner-freebsd-pf@freebsd.org Tue Nov 14 08:36:55 2017 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5DFCD7FDCE for ; Tue, 14 Nov 2017 08:36:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 8E2C075300 for ; Tue, 14 Nov 2017 08:36:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 8A2ECD7FDCD; Tue, 14 Nov 2017 08:36:55 +0000 (UTC) Delivered-To: pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89C70D7FDCC for ; Tue, 14 Nov 2017 08:36:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7835F752FF for ; Tue, 14 Nov 2017 08:36:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id vAE8atf7091966 for ; Tue, 14 Nov 2017 08:36:55 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: pf@FreeBSD.org Subject: [Bug 223208] [pf] pf.conf syntax (:peer) rules load incorrectly Date: Tue, 14 Nov 2017 08:36:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kp@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pf@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.25 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: Tue, 14 Nov 2017 08:36:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223208 --- Comment #11 from Kristof Provost --- (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.=