summaryrefslogtreecommitdiff
path: root/lib/prefix.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2017-02-16 15:12:22 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2017-02-16 15:12:22 +0100
commit66ef4ee487e6477936a122ad12f09ce9bcfb7cf5 (patch)
treefb34d4eb893679eb7a095ce2c21db0cf46135630 /lib/prefix.c
parent63ca1cde19aaf20d6f1492bf8dad7583b1b6c21f (diff)
lib: restore pre-evpn output behavior
If an EVPN entry is detected, and type is not route type 5, displays the Ethernet MAC configured, as it was before evpn is introduced. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/prefix.c')
-rw-r--r--lib/prefix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/prefix.c b/lib/prefix.c
index 19cf7dd8f9..dec22a44a3 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -883,6 +883,11 @@ prefix2str (union prefixconstptr pu, char *str, int size)
else
{
sprintf (str, "UNK AF_ETHER prefix");
+ snprintf(str, size, "%02x:%02x:%02x:%02x:%02x:%02x/%d",
+ p->u.prefix_eth.octet[0], p->u.prefix_eth.octet[1],
+ p->u.prefix_eth.octet[2], p->u.prefix_eth.octet[3],
+ p->u.prefix_eth.octet[4], p->u.prefix_eth.octet[5],
+ p->prefixlen);
}
break;
default: