Skip to content

Commit

Permalink
bgpd: fix special vrf leak label valid
Browse files Browse the repository at this point in the history
Do not consider BGP_PREVENT_VRF_2_VRF_LEAK special label as a valid
label.

Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
louis-6wind committed Feb 1, 2024
1 parent 4888347 commit e9a8df2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bgpd/bgp_label.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ static inline int bgp_is_withdraw_label(mpls_label_t *label)
static inline int bgp_is_valid_label(const mpls_label_t *label)
{
uint8_t *t = (uint8_t *)label;

if (*label == BGP_PREVENT_VRF_2_VRF_LEAK)
return 0;

if (!t)
return 0;
return (t[2] & 0x02);
Expand Down

0 comments on commit e9a8df2

Please sign in to comment.