Date: Thu, 30 Nov 2017 21:32:28 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326414 - stable/10/sbin/pfctl Message-ID: <201711302132.vAULWSdN048778@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Thu Nov 30 21:32:28 2017 New Revision: 326414 URL: https://svnweb.freebsd.org/changeset/base/326414 Log: MFC r325850: pfctl: teach route-to to deal with interfaces with multiple addresses 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 and the rule wanted an inet address it'd get removed by remove_invalid_hosts() later on, and we'd have no interface name. We must set the interface name for all node_host entries in the list, not just the first one. PR: 223208 Modified: stable/10/sbin/pfctl/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/pfctl/parse.y ============================================================================== --- stable/10/sbin/pfctl/parse.y Thu Nov 30 21:21:22 2017 (r326413) +++ stable/10/sbin/pfctl/parse.y Thu Nov 30 21:32:28 2017 (r326414) @@ -4310,8 +4310,11 @@ route_host : STRING { $$->tail = $$; } | '(' STRING host ')' { + struct node_host *n; + $$ = $3; - $$->ifname = $2; + for (n = $3; n != NULL; n = n->next) + n->ifname = $2; } ;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711302132.vAULWSdN048778>