summaryrefslogtreecommitdiffstats
path: root/ldpd/log.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-03-03 21:50:22 +0100
committerRenato Westphal <renato@opensourcerouting.org>2017-03-03 21:50:22 +0100
commitd4afb81972d9666d730445fa81090d711fc0d54f (patch)
tree50eb9c287f7cb1ff7b2b0c87f03c58b29c3cb8a8 /ldpd/log.c
parentldpd: implement RFC 5561 (LDP Capabilities) (diff)
downloadfrr-d4afb81972d9666d730445fa81090d711fc0d54f.tar.xz
frr-d4afb81972d9666d730445fa81090d711fc0d54f.zip
ldpd: implement RFC 5918 (Typed Wildcard FEC)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--ldpd/log.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ldpd/log.c b/ldpd/log.c
index a02210efe..0e85daea2 100644
--- a/ldpd/log.c
+++ b/ldpd/log.c
@@ -332,6 +332,23 @@ log_map(const struct map *map)
pw_type_name(map->fec.pwid.type)) == -1)
return ("???");
break;
+ case MAP_TYPE_TYPED_WCARD:
+ if (snprintf(buf, sizeof(buf), "typed wildcard") < 0)
+ return ("???");
+ switch (map->fec.twcard.type) {
+ case MAP_TYPE_PREFIX:
+ if (snprintf(buf + strlen(buf), sizeof(buf) -
+ strlen(buf), " (prefix, address-family %s)",
+ af_name(map->fec.twcard.u.prefix_af)) < 0)
+ return ("???");
+ break;
+ default:
+ if (snprintf(buf + strlen(buf), sizeof(buf) -
+ strlen(buf), " (unknown type)") < 0)
+ return ("???");
+ break;
+ }
+ break;
default:
return ("???");
}