From 50befbbe2e1ae60123c8eb42e5a7fbe3f20ab288 Mon Sep 17 00:00:00 2001 From: kn Date: Tue, 11 Sep 2018 10:42:10 +0000 Subject: [PATCH] Fix netmask regression in get_dynnode() I introduced this error with r1.330 while removing the af parameter from unmask(). `pass inet from (lo0)/24' would result in `pass inet from (lo0)', sorry. --- sbin/pfctl/pfctl_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 089069dc72e..ddd1b9ca60b 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.335 2018/09/11 09:02:27 kn Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.336 2018/09/11 10:42:10 kn Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1335,7 +1335,7 @@ gen_dynnode(struct node_host *h, sa_family_t af) /* fix up netmask */ m = &n->addr.v.a.mask; - if (af == AF_INET && unmask(m)) + if (af == AF_INET && unmask(m) > 32) set_ipmask(n, 32); return (n); -- 2.20.1