diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-07-11 15:22:23 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-07-11 15:22:23 +0000 |
commit | 9ea5f5267fff4f5b644f6f036261763f4baac8db (patch) | |
tree | 53abad20fc9596abfc76bbc52d9d9d35be62a016 | |
parent | 3233e578eb00eb2542059a76daeff4f7fe0efa4a (diff) |
Create the group when adding a dynamic interface that's not yet plugged in.
ok henning@
-rw-r--r-- | sys/net/pf_if.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c index 60f16b9beeb..34d9168fc6e 100644 --- a/sys/net/pf_if.c +++ b/sys/net/pf_if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.16 2004/07/04 22:56:52 henning Exp $ */ +/* $OpenBSD: pf_if.c,v 1.17 2004/07/11 15:22:22 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -221,6 +221,11 @@ pfi_lookup_create(const char *name) if (p == NULL) { pfi_copy_group(key.pfik_name, name, sizeof(key.pfik_name)); q = pfi_lookup_if(key.pfik_name); + if (q == NULL) { + pfi_newgroup(key.pfik_name, PFI_IFLAG_DYNAMIC); + q = pfi_lookup_if(key.pfik_name); + } + q = pfi_lookup_if(key.pfik_name); if (q != NULL) p = pfi_if_create(name, q, PFI_IFLAG_INSTANCE); } |