bgpd: general MP/SAFI improvements
This fixes some minor mixups particularly in MPLS-related SAFIs, as well
as doing some stylistic changes & adding comments.
Signed-off-by: Lou Berger <lberger@labn.net>
Reviewed-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index 78a71e7..e922665 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -178,13 +178,10 @@
decode_rd_ip (pnt + 5, &rd_ip);
break;
- case RD_TYPE_EOI:
- break;
-
- default:
- zlog_err ("Invalid RD type %d", type);
- return -1;
- }
+ default:
+ zlog_err ("Unknown RD type %d", type);
+ break; /* just report */
+ }
p.prefixlen = prefixlen - VPN_PREFIXLEN_MIN_BYTES*8;
memcpy (&p.u.prefix, pnt + VPN_PREFIXLEN_MIN_BYTES,
@@ -323,14 +320,6 @@
snprintf (buf, size, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val);
return buf;
}
- else if (type == RD_TYPE_EOI)
- {
- snprintf(buf, size, "LHI:%d, %02x:%02x:%02x:%02x:%02x:%02x",
- pnt[1], /* LHI */
- pnt[2], pnt[3], pnt[4], pnt[5], pnt[6], pnt[7]); /* MAC */
- return buf;
- }
-
return NULL;
}