diff options
author | Lou Berger <lberger@labn.net> | 2018-02-16 19:36:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 19:36:08 +0100 |
commit | df82650c67132b63a75c5daee504c164c16ba546 (patch) | |
tree | 779ab5c3e5815757653df3cf5c34e8b38a216313 /sharpd | |
parent | Merge pull request #1755 from donaldsharp/install_it_tar (diff) | |
parent | zebra: Ensure unconfiguration works properly for vrf labels (diff) | |
download | frr-df82650c67132b63a75c5daee504c164c16ba546.tar.xz frr-df82650c67132b63a75c5daee504c164c16ba546.zip |
Merge pull request #1753 from donaldsharp/afi_vrf_label
lib, sharpd, zebra: Update the zapi_vrf_label call to add afi
Diffstat (limited to 'sharpd')
-rw-r--r-- | sharpd/sharp_vty.c | 7 | ||||
-rw-r--r-- | sharpd/sharp_zebra.c | 4 | ||||
-rw-r--r-- | sharpd/sharp_zebra.h | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c index 4f7d61b22..0e7d1f2c2 100644 --- a/sharpd/sharp_vty.c +++ b/sharpd/sharp_vty.c @@ -80,14 +80,17 @@ DEFPY (install_routes, } DEFPY(vrf_label, vrf_label_cmd, - "sharp label vrf NAME$name label (0-100000)$label", + "sharp label <ip$ipv4|ipv6$ipv6> vrf NAME$name label (0-100000)$label", "Sharp Routing Protocol\n" "Give a vrf a label\n" + "Pop and forward for IPv4\n" + "Pop and forward for IPv6\n" VRF_CMD_HELP_STR "The label to use, 0 specifies remove the label installed from previous\n" "Specified range to use\n") { struct vrf *vrf; + afi_t afi = (ipv4) ? AFI_IP : AFI_IP6; if (strcmp(name, "default") == 0) vrf = vrf_lookup_by_id(VRF_DEFAULT); @@ -102,7 +105,7 @@ DEFPY(vrf_label, vrf_label_cmd, if (label == 0) label = MPLS_LABEL_NONE; - vrf_label_add(vrf->vrf_id, label); + vrf_label_add(vrf->vrf_id, afi, label); return CMD_SUCCESS; } diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index f771e53f0..78e8cf0ad 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -152,9 +152,9 @@ static void zebra_connected(struct zclient *zclient) zclient_send_reg_requests(zclient, VRF_DEFAULT); } -void vrf_label_add(vrf_id_t vrf_id, mpls_label_t label) +void vrf_label_add(vrf_id_t vrf_id, afi_t afi, mpls_label_t label) { - zclient_send_vrf_label(zclient, vrf_id, label, ZEBRA_LSP_SHARP); + zclient_send_vrf_label(zclient, vrf_id, afi, label, ZEBRA_LSP_SHARP); } void route_add(struct prefix *p, struct nexthop *nh) diff --git a/sharpd/sharp_zebra.h b/sharpd/sharp_zebra.h index 281c67ff9..0bba443bd 100644 --- a/sharpd/sharp_zebra.h +++ b/sharpd/sharp_zebra.h @@ -24,7 +24,7 @@ extern void sharp_zebra_init(void); -extern void vrf_label_add(vrf_id_t vrf_id, mpls_label_t label); +extern void vrf_label_add(vrf_id_t vrf_id, afi_t afi, mpls_label_t label); extern void route_add(struct prefix *p, struct nexthop *nh); extern void route_delete(struct prefix *p); #endif |