summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_vty.c7
-rw-r--r--sharpd/sharp_zebra.c4
-rw-r--r--sharpd/sharp_zebra.h2
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