mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:27:53 +00:00
zebra: Add namespace info to the nexthop dataplane ctx
The nexthop dataplane context was not getting populated with namespace info for its netlink messages. Fixed this to do lookups the same way we do it with route contexts. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
e8968ccb2b
commit
1909e63acf
@ -1495,6 +1495,9 @@ static int dplane_ctx_nexthop_init(struct zebra_dplane_ctx *ctx,
|
|||||||
enum dplane_op_e op,
|
enum dplane_op_e op,
|
||||||
struct nhg_hash_entry *nhe)
|
struct nhg_hash_entry *nhe)
|
||||||
{
|
{
|
||||||
|
struct zebra_ns *zns;
|
||||||
|
struct zebra_vrf *zvrf;
|
||||||
|
|
||||||
int ret = EINVAL;
|
int ret = EINVAL;
|
||||||
|
|
||||||
if (!ctx || !nhe)
|
if (!ctx || !nhe)
|
||||||
@ -1508,6 +1511,14 @@ static int dplane_ctx_nexthop_init(struct zebra_dplane_ctx *ctx,
|
|||||||
ctx->u.rinfo.zd_nhe.nhg.nexthop = NULL;
|
ctx->u.rinfo.zd_nhe.nhg.nexthop = NULL;
|
||||||
nexthop_group_copy(&(ctx->u.rinfo.zd_nhe.nhg), &nhe->nhg);
|
nexthop_group_copy(&(ctx->u.rinfo.zd_nhe.nhg), &nhe->nhg);
|
||||||
|
|
||||||
|
/* Extract ns info - can't use pointers to 'core' structs */
|
||||||
|
zvrf = vrf_info_lookup(nhe->vrf_id);
|
||||||
|
zns = zvrf->zns;
|
||||||
|
|
||||||
|
// TODO: Might not need to mark this as an update, since
|
||||||
|
// it probably won't require two messages
|
||||||
|
dplane_ctx_ns_init(ctx, zns, (op == DPLANE_OP_NH_UPDATE));
|
||||||
|
|
||||||
ret = AOK;
|
ret = AOK;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
Loading…
Reference in New Issue
Block a user