diff options
Diffstat (limited to 'lib/nexthop.c')
| -rw-r--r-- | lib/nexthop.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c index 405db6a5cb..0984c1a168 100644 --- a/lib/nexthop.c +++ b/lib/nexthop.c @@ -442,6 +442,15 @@ void nexthop_copy(struct nexthop *copy, const struct nexthop *nexthop, &nexthop->nh_label->label[0]); } +struct nexthop *nexthop_dup(const struct nexthop *nexthop, + struct nexthop *rparent) +{ + struct nexthop *new = nexthop_new(); + + nexthop_copy(new, nexthop, rparent); + return new; +} + /* * nexthop printing variants: * %pNHvv |
