diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-07-07 04:37:57 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-07-07 04:37:57 +0000 |
commit | 95832a7fade2e7c91fd2c50df9e609733f8b03b5 (patch) | |
tree | 10290da4b2cab18305299e1ddc25f068b8f35d32 /usr.sbin/ospf6d | |
parent | 269cb86aeb62847a41d599399b6985fb093dcf93 (diff) |
Just use if_find() to find an interface by ifindex.
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r-- | usr.sbin/ospf6d/rde.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/ospf6d/rde.c b/usr.sbin/ospf6d/rde.c index 3c562081f38..fd3f770cacd 100644 --- a/usr.sbin/ospf6d/rde.c +++ b/usr.sbin/ospf6d/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.56 2011/07/07 04:35:47 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.57 2011/07/07 04:37:56 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -1029,11 +1029,7 @@ rde_nbr_new(u_int32_t peerid, struct rde_nbr *new) if ((area = area_find(rdeconf, new->area_id)) == NULL) fatalx("rde_nbr_new: unknown area"); - LIST_FOREACH(iface, &area->iface_list, entry) { - if (iface->ifindex == new->ifindex) - break; - } - if (iface == NULL) + if ((iface = if_find(new->ifindex)) == NULL) fatalx("rde_nbr_new: unknown interface"); if ((nbr = calloc(1, sizeof(*nbr))) == NULL) |