diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2005-05-27 19:16:33 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2005-05-27 19:16:33 +0000 |
commit | dd24df2909206625e6546d2ca898e7e261548f6a (patch) | |
tree | b41848cd5ceae08929dc14e1dd15def49c3b4976 | |
parent | ec8755dd420eb4c4c0f442685119e84318f13ef9 (diff) |
-in our current model, a kif has either a pointer to an interface (ifnet) or
a group, or there cannot be addresses associated with it. so we can get rid
of checking kifs in the 3rd case and just be done with it.
-we don't need to try to manually clear the table used for the (interface)
notation when both the ifp and the group pointers are NULL, the pfr_set_addrs
call will do the right thing with an empty set of addrs
suggested by cedric, ryan ok
-rw-r--r-- | sys/net/pf_if.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c index 0a6c78f427e..fee26a24ce0 100644 --- a/sys/net/pf_if.c +++ b/sys/net/pf_if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.34 2005/05/26 05:28:35 henning Exp $ */ +/* $OpenBSD: pf_if.c,v 1.35 2005/05/27 19:16:32 henning Exp $ */ /* * Copyright 2005 Henning Brauer <henning@openbsd.org> @@ -436,14 +436,9 @@ void pfi_table_update(struct pfr_ktable *kt, struct pfi_kif *kif, int net, int flags) { int e, size2 = 0; - struct pfi_kif *p; struct pfr_table t; struct ifg_member *ifgm; - if (kif->pfik_ifp == NULL && kif->pfik_group == NULL) { - pfr_clr_addrs(&kt->pfrkt_t, NULL, 0); - return; - } pfi_buffer_cnt = 0; if (kif->pfik_ifp != NULL) @@ -451,10 +446,6 @@ pfi_table_update(struct pfr_ktable *kt, struct pfi_kif *kif, int net, int flags) else if (kif->pfik_group != NULL) TAILQ_FOREACH(ifgm, &kif->pfik_group->ifg_members, ifgm_next) pfi_instance_add(ifgm->ifgm_ifp, net, flags); - else - RB_FOREACH(p, pfi_ifhead, &pfi_ifs) - if (p->pfik_ifp != NULL) - pfi_instance_add(p->pfik_ifp, net, flags); t = kt->pfrkt_t; t.pfrt_flags = 0; |