summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-02-09 16:32:33 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-02-09 16:32:33 +0000
commit0e2400b05dceed33e9d8bfddc75ef02cb5face01 (patch)
tree692a066b2780944e9dcd8727db29f659d974856c /usr.sbin/ospfd
parentba44190f2f6e04940e4a63b4a9b519bcada2fb4f (diff)
Initialize iface->self only once. if_act_start() may be called multiple
times for a interface.
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r--usr.sbin/ospfd/interface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/interface.c b/usr.sbin/ospfd/interface.c
index 3870cc5471e..46277eb4f7f 100644
--- a/usr.sbin/ospfd/interface.c
+++ b/usr.sbin/ospfd/interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.c,v 1.4 2005/02/07 05:51:00 david Exp $ */
+/* $OpenBSD: interface.c,v 1.5 2005/02/09 16:32:32 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -361,7 +361,8 @@ if_act_start(struct iface *iface)
}
/* init the dummy local neighbor */
- iface->self = nbr_new(ospfe_router_id(), iface, 1);
+ if (iface->self == NULL)
+ iface->self = nbr_new(ospfe_router_id(), iface, 1);
/* up interface */
/* ... */