zebra: fix SRv6 encap lost during recursive nexthop resolution #21519
frrbot / frrbot
completed
Apr 14, 2026 in 11s
Style and/or linter errors found
Style and/or linter errors found
Details
Thanks for your contribution to FRR!
Click for style suggestions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index 68ed2f0c47..51b21c9a68 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -1965,18 +1965,12 @@ static struct nexthop *nexthop_set_resolved(afi_t afi, const struct nexthop *new
* how MPLS labels are stacked above).
*/
if (newhop->nh_srv6) {
- if (newhop->nh_srv6->seg6local_action !=
- ZEBRA_SEG6_LOCAL_ACTION_UNSPEC)
- nexthop_add_srv6_seg6local(resolved_hop,
- newhop->nh_srv6
- ->seg6local_action,
- &newhop->nh_srv6
- ->seg6local_ctx);
- if (newhop->nh_srv6->seg6_segs &&
- newhop->nh_srv6->seg6_segs->num_segs &&
+ if (newhop->nh_srv6->seg6local_action != ZEBRA_SEG6_LOCAL_ACTION_UNSPEC)
+ nexthop_add_srv6_seg6local(resolved_hop, newhop->nh_srv6->seg6local_action,
+ &newhop->nh_srv6->seg6local_ctx);
+ if (newhop->nh_srv6->seg6_segs && newhop->nh_srv6->seg6_segs->num_segs &&
!sid_zero(newhop->nh_srv6->seg6_segs))
- nexthop_add_srv6_seg6(resolved_hop,
- &newhop->nh_srv6->seg6_segs->seg[0],
+ nexthop_add_srv6_seg6(resolved_hop, &newhop->nh_srv6->seg6_segs->seg[0],
newhop->nh_srv6->seg6_segs->num_segs,
newhop->nh_srv6->seg6_segs->encap_behavior);
}
To apply the style suggestions:
curl https://gist.githubusercontent.com/polychaeta/50c970c0c1c419af584a0b7569d04f1d/raw/11bd7cfb25e4c7e3094c67bb12f6a8f9be01f81a/style.diff | git apply -
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Loading