diff options
Diffstat (limited to 'sharpd/sharp_vty.c')
| -rw-r--r-- | sharpd/sharp_vty.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c index 3a2a7aa407..f0a75a5fc2 100644 --- a/sharpd/sharp_vty.c +++ b/sharpd/sharp_vty.c @@ -179,7 +179,7 @@ DEFPY (install_routes, <nexthop <A.B.C.D$nexthop4|X:X::X:X$nexthop6>|\ nexthop-group NHGNAME$nexthop_group>\ [backup$backup <A.B.C.D$backup_nexthop4|X:X::X:X$backup_nexthop6>] \ - (1-1000000)$routes [instance (0-255)$instance] [repeat (2-1000)$rpt] [opaque WORD]", + (1-1000000)$routes [instance (0-255)$instance] [repeat (2-1000)$rpt] [opaque WORD] [no-recurse$norecurse]", "Sharp routing Protocol\n" "install some routes\n" "Routes to install\n" @@ -201,7 +201,8 @@ DEFPY (install_routes, "Should we repeat this command\n" "How many times to repeat this command\n" "What opaque data to send down\n" - "The opaque data\n") + "The opaque data\n" + "No recursive nexthops\n") { struct vrf *vrf; struct prefix prefix; @@ -210,6 +211,7 @@ DEFPY (install_routes, sg.r.total_routes = routes; sg.r.installed_routes = 0; + sg.r.flags = 0; if (rpt >= 2) sg.r.repeat = rpt * 2; @@ -317,12 +319,16 @@ DEFPY (install_routes, else sg.r.opaque[0] = '\0'; + /* Default is to ask for recursive nexthop resolution */ + if (norecurse == NULL) + SET_FLAG(sg.r.flags, ZEBRA_FLAG_ALLOW_RECURSION); + sg.r.inst = instance; sg.r.vrf_id = vrf->vrf_id; rts = routes; sharp_install_routes_helper(&prefix, sg.r.vrf_id, sg.r.inst, nhgid, &sg.r.nhop_group, &sg.r.backup_nhop_group, - rts, 0, sg.r.opaque); + rts, sg.r.flags, sg.r.opaque); return CMD_SUCCESS; } |
