diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2004-08-10 11:10:02 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2004-08-10 11:10:02 +0000 |
commit | 51d7fa141fd9b9c007246a705d784b856d570fba (patch) | |
tree | c5d0c222216ee77fb102a6e8fb9e279c1fd93a66 /sys/net | |
parent | a1eed2a528715bff04bb50515c452bc39aaf3207 (diff) |
when inserting a dynamic group entry into the pfi_ifs tree, don't incorrectly
create an interface entry with the same name. Prevents panics due to
subsequent invalid refcounting.
from Chris Pascoe
ok dhartmei@ henning@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pf_if.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c index 34d9168fc6e..dafb07a9ddd 100644 --- a/sys/net/pf_if.c +++ b/sys/net/pf_if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.17 2004/07/11 15:22:22 mcbride Exp $ */ +/* $OpenBSD: pf_if.c,v 1.18 2004/08/10 11:10:01 dlg Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -225,8 +225,8 @@ pfi_lookup_create(const char *name) 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_lookup_if(name); + if (p == NULL && q != NULL) p = pfi_if_create(name, q, PFI_IFLAG_INSTANCE); } splx(s); |