]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zapi_msg.c
staticd: Do not ready prefix for printing till it's decoded
[mirror_frr.git] / zebra / zapi_msg.c
index 42b0a815104e09802d3a992066432f9acce08efd..26a3cd5b42a03fca4dd06072525006c85cd3f5c9 100644 (file)
@@ -118,6 +118,7 @@ static void zserv_encode_vrf(struct stream *s, struct zebra_vrf *zvrf)
 
 static int zserv_encode_nexthop(struct stream *s, struct nexthop *nexthop)
 {
+       stream_putl(s, nexthop->vrf_id);
        stream_putc(s, nexthop->type);
        switch (nexthop->type) {
        case NEXTHOP_TYPE_IPV4:
@@ -247,7 +248,7 @@ int zsend_interface_link_params(struct zserv *client, struct interface *ifp)
  *      RTM_IFANNOUNCE or AF_NETLINK sockets is available), or when
  *      an interface is marked IFF_UP (i.e., an RTM_IFINFO message is
  *      received)
- *    - for the vty commands "ip address A.B.C.D/M [<secondary>|<label LINE>]"
+ *    - for the vty commands "ip address A.B.C.D/M [<label LINE>]"
  *      and "no bandwidth <1-10000000>", "ipv6 address X:X::X:X/M"
  *    - when an RTM_NEWADDR message is received from the kernel,
  *
@@ -268,7 +269,7 @@ int zsend_interface_link_params(struct zserv *client, struct interface *ifp)
  *             |
  *         vty commands:
  *     "no ip address A.B.C.D/M [label LINE]"
- *     "no ip address A.B.C.D/M secondary"
+ *     "no ip address A.B.C.D/M"
  *     ["no ipv6 address X:X::X:X/M"]
  *
  */
@@ -1186,6 +1187,7 @@ static void zread_fec_register(ZAPI_HANDLER_ARGS)
        unsigned short l = 0;
        struct prefix p;
        uint16_t flags;
+       uint32_t label = MPLS_INVALID_LABEL;
        uint32_t label_index = MPLS_INVALID_LABEL_INDEX;
 
        s = msg;
@@ -1228,12 +1230,15 @@ static void zread_fec_register(ZAPI_HANDLER_ARGS)
                l += 5;
                STREAM_GET(&p.u.prefix, s, PSIZE(p.prefixlen));
                l += PSIZE(p.prefixlen);
-               if (flags & ZEBRA_FEC_REGISTER_LABEL_INDEX) {
+               if (flags & ZEBRA_FEC_REGISTER_LABEL) {
+                       STREAM_GETL(s, label);
+                       l += 4;
+               } else if (flags & ZEBRA_FEC_REGISTER_LABEL_INDEX) {
                        STREAM_GETL(s, label_index);
                        l += 4;
-               } else
-                       label_index = MPLS_INVALID_LABEL_INDEX;
-               zebra_mpls_fec_register(zvrf, &p, label_index, client);
+               }
+
+               zebra_mpls_fec_register(zvrf, &p, label, label_index, client);
        }
 
 stream_failure:
@@ -2442,6 +2447,7 @@ void (*zserv_handlers[])(ZAPI_HANDLER_ARGS) = {
        [ZEBRA_REMOTE_VTEP_DEL] = zebra_vxlan_remote_vtep_del,
        [ZEBRA_REMOTE_MACIP_ADD] = zebra_vxlan_remote_macip_add,
        [ZEBRA_REMOTE_MACIP_DEL] = zebra_vxlan_remote_macip_del,
+       [ZEBRA_DUPLICATE_ADDR_DETECTION] = zebra_vxlan_dup_addr_detection,
        [ZEBRA_INTERFACE_SET_MASTER] = zread_interface_set_master,
        [ZEBRA_PW_ADD] = zread_pseudowire,
        [ZEBRA_PW_DELETE] = zread_pseudowire,