summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/pfctl
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-06 15:42:44 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-15 10:56:14 +0100
commite0b4edbdcc3558d3f38af8398f995c2e9f019f07 (patch)
treeea91a5fcfb9b6a66a8c0b74cf68ff8d450ce17e0 /freebsd/sbin/pfctl
parentDisable or make static kern_* functions (diff)
downloadrtems-libbsd-e0b4edbdcc3558d3f38af8398f995c2e9f019f07.tar.bz2
Update to FreeBSD head 2018-11-15
Git mirror commit a18b0830c4be01b39489a891b63d6023ada6358a. Update #3472.
Diffstat (limited to 'freebsd/sbin/pfctl')
-rw-r--r--freebsd/sbin/pfctl/parse.y8
-rw-r--r--freebsd/sbin/pfctl/pfctl_parser.c4
2 files changed, 12 insertions, 0 deletions
diff --git a/freebsd/sbin/pfctl/parse.y b/freebsd/sbin/pfctl/parse.y
index adb6e1c9..8b6808a6 100644
--- a/freebsd/sbin/pfctl/parse.y
+++ b/freebsd/sbin/pfctl/parse.y
@@ -776,8 +776,16 @@ numberstring : NUMBER {
;
varset : STRING '=' varstring {
+ char *s = $1;
if (pf->opts & PF_OPT_VERBOSE)
printf("%s = \"%s\"\n", $1, $3);
+ while (*s++) {
+ if (isspace((unsigned char)*s)) {
+ yyerror("macro name cannot contain "
+ "whitespace");
+ YYERROR;
+ }
+ }
if (symset($1, $3, 0) == -1)
err(1, "cannot store variable %s", $1);
free($1);
diff --git a/freebsd/sbin/pfctl/pfctl_parser.c b/freebsd/sbin/pfctl/pfctl_parser.c
index 81e23e84..25e2a59b 100644
--- a/freebsd/sbin/pfctl/pfctl_parser.c
+++ b/freebsd/sbin/pfctl/pfctl_parser.c
@@ -1380,6 +1380,9 @@ ifa_lookup(const char *ifa_name, int flags)
last_if = p->ifname;
if ((flags & PFI_AFLAG_NOALIAS) && p->af == AF_INET && got4)
continue;
+ if ((flags & PFI_AFLAG_NOALIAS) && p->af == AF_INET6 &&
+ IN6_IS_ADDR_LINKLOCAL(&p->addr.v.a.addr.v6))
+ continue;
if ((flags & PFI_AFLAG_NOALIAS) && p->af == AF_INET6 && got6)
continue;
if (p->af == AF_INET)
@@ -1414,6 +1417,7 @@ ifa_lookup(const char *ifa_name, int flags)
set_ipmask(n, 128);
}
n->ifindex = p->ifindex;
+ n->ifname = strdup(p->ifname);
n->next = NULL;
n->tail = n;