diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-06-30 01:47:12 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-06-30 01:47:12 +0000 |
commit | c51973e5d1de0ff9dbe78f5004f098837b107a10 (patch) | |
tree | a7160ad560f35e55392b79e365bf578a9759ea88 /usr.sbin/ldpd/lde_lib.c | |
parent | 6fe1dce7c867cf0570072a1f443f2f564bf60ae4 (diff) |
Switch prefix in struct map to a struct in_addr instead of a u_int32_t.
Needed for further clean etc.
Diffstat (limited to 'usr.sbin/ldpd/lde_lib.c')
-rw-r--r-- | usr.sbin/ldpd/lde_lib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ldpd/lde_lib.c b/usr.sbin/ldpd/lde_lib.c index 8c1b26429e6..4d1366555d1 100644 --- a/usr.sbin/ldpd/lde_lib.c +++ b/usr.sbin/ldpd/lde_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lde_lib.c,v 1.21 2010/06/09 14:01:03 claudio Exp $ */ +/* $OpenBSD: lde_lib.c,v 1.22 2010/06/30 01:47:11 claudio Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -159,7 +159,7 @@ rt_snap(u_int32_t peerid) bzero(&map, sizeof(map)); RB_FOREACH(f, fec_tree, &rt) { r = (struct rt_node *)f; - map.prefix = r->fec.prefix.s_addr; + map.prefix = r->fec.prefix; map.prefixlen = r->fec.prefixlen; map.label = r->local_label; @@ -314,7 +314,7 @@ lde_check_mapping(struct map *map, struct lde_nbr *ln) log_debug("label mapping from nbr %s, FEC %s/%u, label %u", inet_ntoa(ln->id), log_fec(map), map->label); - rn = (struct rt_node *)fec_find_prefix(&rt, map->prefix, + rn = (struct rt_node *)fec_find_prefix(&rt, map->prefix.s_addr, map->prefixlen); if (rn == NULL) { /* The route is not yet in fib. If we are in liberal mode @@ -326,7 +326,7 @@ lde_check_mapping(struct map *map, struct lde_nbr *ln) if (rn == NULL) fatal("lde_check_mapping"); - rn->fec.prefix.s_addr = map->prefix; + rn->fec.prefix = map->prefix; rn->fec.prefixlen = map->prefixlen; rn->local_label = lde_assign_label(); rn->remote_label = NO_LABEL; @@ -419,7 +419,7 @@ lde_check_request(struct map *map, struct lde_nbr *ln) log_debug("label request from nbr %s, FEC %s", inet_ntoa(ln->id), log_fec(map)); - rn = (struct rt_node *)fec_find_prefix(&rt, map->prefix, + rn = (struct rt_node *)fec_find_prefix(&rt, map->prefix.s_addr, map->prefixlen); if (rn == NULL || rn->remote_label == NO_LABEL) { lde_send_notification(ln->peerid, S_NO_ROUTE, map->messageid, |