Skip to content

zebra: fix EVPN MACIP DEL flag mixup in neighbor delete path - #21733

Merged
donaldsharp merged 1 commit into
FRRouting:masterfrom
nick-bouliane:evpn_del_fix_flag
Apr 22, 2026
Merged

zebra: fix EVPN MACIP DEL flag mixup in neighbor delete path#21733
donaldsharp merged 1 commit into
FRRouting:masterfrom
nick-bouliane:evpn_del_fix_flag

Conversation

@nick-bouliane

Copy link
Copy Markdown
Contributor

On ZEBRA_MACIP_DEL, zebra_evpn_neigh_send_del_to_client() was passing ZEBRA_NEIGH_* flags into zebra_evpn_macip_send_msg_to_client(), while debug output decodes those bits as ZEBRA_MACIP_TYPE_* flags. Because bit values overlap, DEL logs could incorrectly print "Sticky MAC".

This is a flag-domain mismatch on DEL reporting, not a behavior change in BGP processing (DEL uses state).

Fix by sending no MACIP flags on neighbor DEL.
Neighbor DEL now passes flags=0, matching the existing MAC DEL behavior in zebra_evpn_mac_send_del_to_client().

On ZEBRA_MACIP_DEL, zebra_evpn_neigh_send_del_to_client() was passing
ZEBRA_NEIGH_* flags into zebra_evpn_macip_send_msg_to_client(), while
debug output decodes those bits as ZEBRA_MACIP_TYPE_* flags. Because bit
values overlap, DEL logs could incorrectly print "Sticky MAC".

This is a flag-domain mismatch on DEL reporting, not a behavior change in
BGP processing (DEL uses state).

Fix by sending no MACIP flags on neighbor DEL.
Neighbor DEL now passes flags=0, matching the existing MAC DEL behavior in
zebra_evpn_mac_send_del_to_client().

Signed-off-by: Nick Bouliane <nbouliane@coreweave.com>
@greptile-apps

greptile-apps Bot commented Apr 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a flag-domain mismatch in zebra_evpn_neigh_send_del_to_client(), where ZEBRA_NEIGH_* flags were incorrectly forwarded to zebra_evpn_macip_send_msg_to_client() on a DEL path, causing debug logs to misinterpret overlapping bit values as ZEBRA_MACIP_TYPE_* flags (e.g. printing "Sticky MAC" incorrectly). The one-line fix passes 0 for flags on DEL, matching the existing zebra_evpn_mac_send_del_to_client() behavior and is safe because the DEL wire-protocol path only encodes state, not flags.

Confidence Score: 5/5

Safe to merge β€” the fix is minimal, correct, and consistent with the existing MAC DEL pattern.

Single-line change fixes a debug-logging flag mismatch. The DEL wire protocol path writes state (not flags), so passing 0 for flags has no impact on BGP behavior. The fix mirrors the already-correct zebra_evpn_mac_send_del_to_client() implementation. No P0/P1 issues found.

No files require special attention.

Important Files Changed

Filename Overview
zebra/zebra_evpn_neigh.c Single-line fix: replaces flags with 0 in the DEL path call to zebra_evpn_macip_send_msg_to_client(), eliminating a flag-domain mismatch in debug logging. Consistent with MAC DEL behavior. No behavior change on the wire.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant neigh_send_del as zebra_evpn_neigh_send_del_to_client
    participant macip_send as zebra_evpn_macip_send_msg_to_client
    participant BGP

    Caller->>neigh_send_del: vni, ip, macaddr, ZEBRA_NEIGH_* flags, state
    note over neigh_send_del: Guard: skip if not advertised
    neigh_send_del->>macip_send: vni, macaddr, ip, flags=0, seq=0, state, NULL, ZEBRA_MACIP_DEL
    note over macip_send: DEL path: only encodes state on wire (flags ignored)
    note over macip_send: Debug log uses flags=0 - no false Sticky MAC
    macip_send->>BGP: ZEBRA_MACIP_DEL (state)
Loading

Reviews (1): Last reviewed commit: "zebra: fix EVPN MACIP DEL flag mixup in ..." | Re-trigger Greptile

@donaldsharp
donaldsharp merged commit 6347b26 into FRRouting:master Apr 22, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants