summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/neighbor.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ldpd/neighbor.c')
-rw-r--r--usr.sbin/ldpd/neighbor.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/ldpd/neighbor.c b/usr.sbin/ldpd/neighbor.c
index f28f9f536e6..918c4fe1b4e 100644
--- a/usr.sbin/ldpd/neighbor.c
+++ b/usr.sbin/ldpd/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.21 2010/09/06 08:36:33 claudio Exp $ */
+/* $OpenBSD: neighbor.c,v 1.22 2010/10/26 12:22:35 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -556,10 +556,7 @@ nbr_mapping_add(struct nbr *nbr, struct mapping_head *mh, struct map *map)
me = calloc(1, sizeof(*me));
if (me == NULL)
fatal("nbr_mapping_add");
-
- me->prefix = map->prefix.s_addr;
- me->prefixlen = map->prefixlen;
- me->label = map->label;
+ me->map = *map;
TAILQ_INSERT_TAIL(mh, me, entry);
}
@@ -570,8 +567,8 @@ nbr_mapping_find(struct nbr *nbr, struct mapping_head *mh, struct map *map)
struct mapping_entry *me = NULL;
TAILQ_FOREACH(me, mh, entry) {
- if (me->prefix == map->prefix.s_addr &&
- me->prefixlen == map->prefixlen)
+ if (me->map.prefix.s_addr == map->prefix.s_addr &&
+ me->map.prefixlen == map->prefixlen)
return (me);
}