ZEBRA_ROUTE_OPENFABRIC, openfabric, fabricd, 'f', 1, 1, 1, "OpenFabric", fabricd
ZEBRA_ROUTE_VRRP, vrrp, vrrpd, '-', 0, 0, 0, "VRRP", vrrpd
ZEBRA_ROUTE_NHG, zebra, none, '-', 0, 0, 0, "Nexthop Group", none
-ZEBRA_ROUTE_NEIGH, neigh, none, '-', 0, 0, 0, "Neigh Entry", none
ZEBRA_ROUTE_SRTE, srte, none, '-', 0, 0, 0, "SR-TE", none
ZEBRA_ROUTE_ALL, wildcard, none, '-', 0, 0, 0, "-", none
ZEBRA_ROUTE_VRRP, "Virtual Router Redundancy Protocol (VRRP)"
ZEBRA_ROUTE_OPENFABRIC, "OpenFabric Routing Protocol"
ZEBRA_ROUTE_NHG, "Zebra Nexthop Groups (NHG)"
-ZEBRA_ROUTE_NEIGH, "Zebra Neighbor Entry"
break;
case ZEBRA_ROUTE_TABLE:
case ZEBRA_ROUTE_NHG:
- case ZEBRA_ROUTE_NEIGH:
proto = RTPROT_ZEBRA;
break;
case ZEBRA_ROUTE_CONNECT:
void *buf, size_t buflen)
{
struct ethaddr dst_mac = {.octet = {0}};
+ int proto = RTPROT_ZEBRA;
+
+ if (dplane_ctx_get_type(ctx) != 0)
+ proto = zebra2proto(dplane_ctx_get_type(ctx));
return netlink_neigh_update_msg_encode(
ctx, cmd, (const void *)&dst_mac, ETH_ALEN,
dplane_ctx_neigh_get_ipaddr(ctx), false, PF_BRIDGE, 0, NTF_SELF,
(NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/, false /*nfy*/,
0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/, buf, buflen,
- zebra2proto(dplane_ctx_get_type(ctx)));
+ proto);
}
#ifndef NDA_RTA
uint32_t update_flags;
bool nfy = false;
uint8_t nfy_flags = 0;
+ int proto = RTPROT_ZEBRA;
+
+ if (dplane_ctx_get_type(ctx) != 0)
+ proto = zebra2proto(dplane_ctx_get_type(ctx));
cmd = dplane_ctx_get_op(ctx) == DPLANE_OP_MAC_INSTALL
? RTM_NEWNEIGH : RTM_DELNEIGH;
ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN,
&vtep_ip, true, AF_BRIDGE, 0, flags, state, nhg_id, nfy,
nfy_flags, false /*ext*/, 0 /*ext_flags*/, data, datalen,
- zebra2proto(dplane_ctx_get_type(ctx)));
+ proto);
return total;
}
uint32_t update_flags;
uint32_t ext_flags = 0;
bool ext = false;
+ int proto = RTPROT_ZEBRA;
+
+ if (dplane_ctx_get_type(ctx) != 0)
+ proto = zebra2proto(dplane_ctx_get_type(ctx));
ip = dplane_ctx_neigh_get_ipaddr(ctx);
return netlink_neigh_update_msg_encode(
ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST,
flags, state, 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext,
- ext_flags, buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
+ ext_flags, buf, buflen, proto);
}
static int netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
result = neigh_update_internal(
DPLANE_OP_NEIGH_INSTALL, ifp, (const void *)mac, AF_ETHERNET,
- ip, flags, DPLANE_NUD_NOARP, update_flags, ZEBRA_ROUTE_NEIGH);
+ ip, flags, DPLANE_NUD_NOARP, update_flags, 0);
return result;
}
result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
(const void *)mac, AF_ETHERNET, ip, ntf,
- state, update_flags, ZEBRA_ROUTE_NEIGH);
+ state, update_flags, 0);
return result;
}
update_flags |= DPLANE_NEIGH_REMOTE;
result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE, ifp, NULL,
- AF_ETHERNET, ip, 0, 0, update_flags, ZEBRA_ROUTE_NEIGH);
+ AF_ETHERNET, ip, 0, 0, update_flags, 0);
return result;
}
addr.ipaddr_v4 = *ip;
result = neigh_update_internal(DPLANE_OP_VTEP_ADD, ifp, &mac,
- AF_ETHERNET, &addr, 0, 0, 0, ZEBRA_ROUTE_NEIGH);
+ AF_ETHERNET, &addr, 0, 0, 0, 0);
return result;
}
result = neigh_update_internal(DPLANE_OP_VTEP_DELETE, ifp,
(const void *)&mac, AF_ETHERNET, &addr,
- 0, 0, 0, ZEBRA_ROUTE_NEIGH);
+ 0, 0, 0, 0);
return result;
}
result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL,
AF_ETHERNET, ip, DPLANE_NTF_USE,
- DPLANE_NUD_INCOMPLETE, 0, ZEBRA_ROUTE_NEIGH);
+ DPLANE_NUD_INCOMPLETE, 0, 0);
return result;
}
[ZEBRA_ROUTE_OPENFABRIC] = {ZEBRA_ROUTE_OPENFABRIC, 115, 4},
[ZEBRA_ROUTE_VRRP] = {ZEBRA_ROUTE_VRRP, 255, 6},
[ZEBRA_ROUTE_SRTE] = {ZEBRA_ROUTE_SRTE, 255, 6},
- [ZEBRA_ROUTE_NEIGH] = {ZEBRA_ROUTE_NEIGH, 255, 6},
/* Any new route type added to zebra, should be mirrored here */
/* no entry/default: 150 */