diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 16:12:29 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 16:12:29 +0000 |
commit | 74a0f263b82f760fff9cff8429f809bbb667cdba (patch) | |
tree | 2ee632f2ffcfbe35f3b1f1fb78d669d65aba9aac /usr.sbin/ldpd/lde_lib.c | |
parent | 1d5a645b71e211dbd1ceaa414d58424b2a615c12 (diff) |
Rename a few constants to avoid confusion.
In ldpd we have the map structure, which is used to represent a label message,
and the fec structure, used to store FECs in the LIB.
As of now, ldpd supports two type of FECs:
* IPv4 prefix (FEC_TYPE_IPV4);
* PWID (FEC_TYPE_PWID).
For the label messages, the following contants were being used:
* FEC_WILDCARD;
* FEC_PREFIX (IPv4 or IPv6);
* FEC_PWID.
Since these contants have similar names to the previous ones, rename
them to:
* MAP_TYPE_WILDCARD;
* MAP_TYPE_PREFIX;
* MAP_TYPE_PWID.
Diffstat (limited to 'usr.sbin/ldpd/lde_lib.c')
-rw-r--r-- | usr.sbin/ldpd/lde_lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ldpd/lde_lib.c b/usr.sbin/ldpd/lde_lib.c index 75eee0c2ff8..0dcc3246a85 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.41 2016/05/23 15:14:07 renato Exp $ */ +/* $OpenBSD: lde_lib.c,v 1.42 2016/05/23 16:12:28 renato Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -407,7 +407,7 @@ lde_check_mapping(struct map *map, struct lde_nbr *ln) lde_req_del(ln, lre, 1); /* RFC 4447 control word and status tlv negotiation */ - if (map->type == FEC_PWID && l2vpn_pw_negotiate(ln, fn, map)) + if (map->type == MAP_TYPE_PWID && l2vpn_pw_negotiate(ln, fn, map)) return; /* @@ -446,10 +446,10 @@ lde_check_mapping(struct map *map, struct lde_nbr *ln) /* LMp.15: install FEC in FIB */ fnh->remote_label = map->label; switch (map->type) { - case FEC_PREFIX: + case MAP_TYPE_PREFIX: lde_send_change_klabel(fn, fnh); break; - case FEC_PWID: + case MAP_TYPE_PWID: pw = (struct l2vpn_pw *) fnh->data; pw->remote_group = map->fec.pwid.group_id; if (map->flags & F_MAP_PW_IFMTU) |