diff --git a/bgpd/bgp_label.h b/bgpd/bgp_label.h index 661e2f6bfb00..7578adb7d14f 100644 --- a/bgpd/bgp_label.h +++ b/bgpd/bgp_label.h @@ -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);