diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2013-10-15 20:41:11 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2013-10-15 20:41:11 +0000 |
commit | bf250cbf39c55f2997e16becf44960db099cb2ef (patch) | |
tree | e306b4802368ac69ab6b6bfc65bab569f06ab443 /usr.sbin | |
parent | bb2d46071aaf1941ffb47634f9e88c29b2755a62 (diff) |
Minor fixes on if_del() and nbr_new().
if_del(): this function is always called after an IF_EVT_DOWN event so
there's no need to cleanup things here;
nbr_new(): C structs shouldn't be copied directly.
OK claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ldpd/interface.c | 4 | ||||
-rw-r--r-- | usr.sbin/ldpd/neighbor.c | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/ldpd/interface.c b/usr.sbin/ldpd/interface.c index aea184212f1..03f33627c7b 100644 --- a/usr.sbin/ldpd/interface.c +++ b/usr.sbin/ldpd/interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interface.c,v 1.19 2013/06/04 02:39:10 claudio Exp $ */ +/* $OpenBSD: interface.c,v 1.20 2013/10/15 20:41:09 renato Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -170,8 +170,6 @@ if_del(struct iface *iface) log_debug("if_del: interface %s", iface->name); - if_stop_hello_timer(iface); - while ((adj = LIST_FIRST(&iface->adj_list)) != NULL) { LIST_REMOVE(adj, iface_entry); adj_del(adj); diff --git a/usr.sbin/ldpd/neighbor.c b/usr.sbin/ldpd/neighbor.c index b0da8ef8bb6..f8f77ad1ecf 100644 --- a/usr.sbin/ldpd/neighbor.c +++ b/usr.sbin/ldpd/neighbor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: neighbor.c,v 1.41 2013/10/15 20:36:30 renato Exp $ */ +/* $OpenBSD: neighbor.c,v 1.42 2013/10/15 20:41:10 renato Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -217,7 +217,7 @@ nbr_new(struct in_addr id, struct in_addr addr) nbr->state = NBR_STA_PRESENT; nbr->id.s_addr = id.s_addr; - nbr->addr = addr; + nbr->addr.s_addr = addr.s_addr; /* get next unused peerid */ while (nbr_find_peerid(++peercnt)) |