On 2011-07-27, Christopher Zimmermann <[email protected]> wrote:
> Ok, solved this one. bge0 was in group "local", which is matched by
>
> set skip on lo
>
> is this the desired behavior? It can catch you by surprise easily!

It's not desired behaviour, I think this should fix it but have
no time to test today

Index: pf_if.c
===================================================================
RCS file: /cvs/src/sys/net/pf_if.c,v
retrieving revision 1.62
diff -u -p -u -7 -r1.62 pf_if.c
--- pf_if.c     20 May 2011 22:50:44 -0000      1.62
+++ pf_if.c     28 Jul 2011 07:11:30 -0000
@@ -724,15 +724,16 @@ pfi_skip_if(const char *filter, struct p
        n = strlen(filter);
        if (n < 1 || n >= IFNAMSIZ)
                return (1);     /* sanity check */
        if (filter[n-1] >= '0' && filter[n-1] <= '9')
                return (1);     /* group names may not end in a digit */
        if (p->pfik_ifp != NULL)
                TAILQ_FOREACH(i, &p->pfik_ifp->if_groups, ifgl_next)
-                       if (!strncmp(i->ifgl_group->ifg_group, filter, n))
+                       if (!strncmp(i->ifgl_group->ifg_group,
+                           filter, IFNAMSIZ))
                                return (0);     /* iface is in group "filter" */
        return (1);
 }
 
 int
 pfi_set_flags(const char *name, int flags)
 {

Reply via email to