bgpd: wire up VPNv6 protocol processing

There wasn't much missing for VPNv6 to begin with; just a few bits of
de- & encoding and a few lists to be updated.

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

[Editorial note: Signed-off-by may imply an authorship claim, but need not]

Edited-by: Paul Jakma <paul.jakma@hpe.com> / <paul@jakma.org>
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index ce8f8a0..ecf1c31 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -1535,11 +1535,36 @@
       stream_get (&attre->mp_nexthop_global_in, s, 4);
       break;
 #ifdef HAVE_IPV6
+    case 24:
+      {
+        u_int32_t rd_high __attribute__((unused));
+        u_int32_t rd_low __attribute__((unused));
+
+        rd_high = stream_getl (s);
+        rd_low = stream_getl (s);
+      }
+      /* fall through */
     case 16:
       stream_get (&attre->mp_nexthop_global, s, 16);
       break;
     case 32:
+    case 48:
+      if (attre->mp_nexthop_len == 48) {
+        u_int32_t rd_high __attribute__((unused));
+        u_int32_t rd_low __attribute__((unused));
+
+        rd_high = stream_getl (s);
+        rd_low = stream_getl (s);
+      }
       stream_get (&attre->mp_nexthop_global, s, 16);
+
+      if (attre->mp_nexthop_len == 48) {
+        u_int32_t rd_high __attribute__((unused));
+        u_int32_t rd_low __attribute__((unused));
+
+        rd_high = stream_getl (s);
+        rd_low = stream_getl (s);
+      }
       stream_get (&attre->mp_nexthop_local, s, 16);
       if (! IN6_IS_ADDR_LINKLOCAL (&attre->mp_nexthop_local))
 	{