Index: sbin/pfctl/pfctl_parser.c =================================================================== --- sbin/pfctl/pfctl_parser.c +++ sbin/pfctl/pfctl_parser.c @@ -1563,10 +1563,6 @@ 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; @@ -1575,6 +1571,11 @@ 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 */ if (cont && (h = host_dns(ps, v4mask, v6mask)) != NULL) cont = 0;