From 0e2400b05dceed33e9d8bfddc75ef02cb5face01 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Wed, 9 Feb 2005 16:32:33 +0000 Subject: Initialize iface->self only once. if_act_start() may be called multiple times for a interface. --- usr.sbin/ospfd/interface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin/ospfd/interface.c') 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 @@ -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 */ /* ... */ -- cgit v1.2.3