mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 21:32:58 +00:00
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
This commit is contained in:
parent
6dfeed992a
commit
ceba78f981
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=326414
@ -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;
|
||||
}
|
||||
;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user