svn commit: r326413 - stable/11/sbin/pfctl
Kristof Provost
kp at FreeBSD.org
Thu Nov 30 21:21:24 UTC 2017
Author: kp
Date: Thu Nov 30 21:21:22 2017
New Revision: 326413
URL: https://svnweb.freebsd.org/changeset/base/326413
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/11/sbin/pfctl/parse.y
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sbin/pfctl/parse.y
==============================================================================
--- stable/11/sbin/pfctl/parse.y Thu Nov 30 20:53:57 2017 (r326412)
+++ stable/11/sbin/pfctl/parse.y Thu Nov 30 21:21:22 2017 (r326413)
@@ -4386,8 +4386,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;
}
;
More information about the svn-src-stable-11
mailing list