Index: head/sbin/pfctl/pfctl_parser.c =================================================================== --- head/sbin/pfctl/pfctl_parser.c +++ head/sbin/pfctl/pfctl_parser.c @@ -1563,16 +1563,17 @@ mask = -1; } - /* interface with this name exists? */ - if (cont && (h = host_if(ps, mask)) != NULL) - cont = 0; - /* IPv4 address? */ if (cont && (h = host_v4(s, mask)) != NULL) cont = 0; /* IPv6 address? */ if (cont && (h = host_v6(ps, v6mask)) != NULL) + cont = 0; + + /* interface with this name exists? */ + /* expensive with thousands of interfaces - prioritze IPv4/6 check */ + if (cont && (h = host_if(ps, mask)) != NULL) cont = 0; /* dns lookup */