summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldpd/labelmapping.c
diff options
context:
space:
mode:
authorrenato <renato@openbsd.org>2017-03-03 23:41:27 +0000
committerrenato <renato@openbsd.org>2017-03-03 23:41:27 +0000
commit02a212ee06450d0181143d259c46ebf0aef722e3 (patch)
tree2d433155bf11b1a06c9caa634deba47136139eb4 /usr.sbin/ldpd/labelmapping.c
parentAllow to run on a non-default rdomain. (diff)
downloadwireguard-openbsd-02a212ee06450d0181143d259c46ebf0aef722e3.tar.xz
wireguard-openbsd-02a212ee06450d0181143d259c46ebf0aef722e3.zip
Minor tweaks.
Diffstat (limited to 'usr.sbin/ldpd/labelmapping.c')
-rw-r--r--usr.sbin/ldpd/labelmapping.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/ldpd/labelmapping.c b/usr.sbin/ldpd/labelmapping.c
index 2d2389c111f..9917d9ea28f 100644
--- a/usr.sbin/ldpd/labelmapping.c
+++ b/usr.sbin/ldpd/labelmapping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: labelmapping.c,v 1.61 2016/09/02 17:16:24 renato Exp $ */
+/* $OpenBSD: labelmapping.c,v 1.62 2017/03/03 23:41:27 renato Exp $ */
/*
* Copyright (c) 2014, 2015 Renato Westphal <renato@openbsd.org>
@@ -399,8 +399,8 @@ recv_labelmessage(struct nbr *nbr, char *buf, uint16_t len, uint16_t type)
if (me->map.flags & F_MAP_REQ_ID)
me->map.requestid = reqid;
- log_debug("msg-in: label mapping: lsr-id %s, fec %s, label %s",
- inet_ntoa(nbr->id), log_map(&me->map),
+ log_debug("msg-in: %s: lsr-id %s, fec %s, label %s",
+ msg_name(type), inet_ntoa(nbr->id), log_map(&me->map),
log_label(me->map.label));
switch (type) {
@@ -426,14 +426,14 @@ recv_labelmessage(struct nbr *nbr, char *buf, uint16_t len, uint16_t type)
ldpe_imsg_compose_lde(imsg_type, nbr->peerid, 0, &me->map,
sizeof(struct map));
-next:
+ next:
TAILQ_REMOVE(&mh, me, entry);
free(me);
}
return (0);
-err:
+ err:
mapping_list_clr(&mh);
return (-1);
@@ -565,7 +565,7 @@ gen_fec_tlv(struct ibuf *buf, struct map *map)
break;
case MAP_TYPE_PWID:
if (map->flags & F_MAP_PW_ID)
- pw_len += PW_STATUS_TLV_LEN;
+ pw_len += FEC_PWID_SIZE;
if (map->flags & F_MAP_PW_IFMTU)
pw_len += FEC_SUBTLV_IFMTU_SIZE;