summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.h
diff options
context:
space:
mode:
authoranlan_cs <anlan_cs@tom.com>2024-04-05 15:03:15 +0800
committeranlan_cs <anlan_cs@tom.com>2024-04-06 09:01:39 +0800
commitcbd1f3239a9f44fcbc2dc7d41eee82e623de141f (patch)
tree71a74f8b527ad876778e2948ddcf03c8fd25e886 /zebra/zebra_mpls.h
parent30dcd79011c867c56fd7d5a1201cda0eb656167d (diff)
zebra: fix wrong check for mpls label
Add a parameter for `zebra_mpls_fec_for_label()`, as before if it is `NULL`, otherwise exclude what this parameter represents. Before: ``` anlan(config)# mpls label bind 1.1.1.2/32 88 anlan(config)# mpls label bind 1.1.1.2/32 88 % Label already bound to a FEC anlan(config)# mpls label bind 1.1.1.3/32 88 % Label already bound to a FEC ``` After: ``` anlan(config)# mpls label bind 1.1.1.2/32 88 anlan(config)# mpls label bind 1.1.1.2/32 88 anlan(config)# mpls label bind 1.1.1.3/32 88 % Label already bound to a FEC ``` Signed-off-by: anlan_cs <anlan_cs@tom.com>
Diffstat (limited to 'zebra/zebra_mpls.h')
-rw-r--r--zebra/zebra_mpls.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h
index 1ed2f9b41c..dd6f960146 100644
--- a/zebra/zebra_mpls.h
+++ b/zebra/zebra_mpls.h
@@ -203,12 +203,13 @@ int zebra_mpls_fec_unregister(struct zebra_vrf *zvrf, struct prefix *p,
* hash..
*/
struct zebra_fec *zebra_mpls_fec_for_label(struct zebra_vrf *zvrf,
- mpls_label_t label);
+ struct prefix *p, mpls_label_t label);
/*
* Inform if specified label is currently bound to a FEC or not.
*/
-int zebra_mpls_label_already_bound(struct zebra_vrf *zvrf, mpls_label_t label);
+int zebra_mpls_label_already_bound(struct zebra_vrf *zvrf, struct prefix *p,
+ mpls_label_t label);
/*
* Add static FEC to label binding. If there are clients registered for this