nexthop_compare_func,
nexthop_free);
-static int nexthop_get(Link *link, NextHop *in, NextHop **ret) {
+static int nexthop_get(Link *link, const NextHop *in, NextHop **ret) {
NextHop *existing;
assert(link);
return -ENOENT;
}
-static int nexthop_add_internal(Link *link, Set **nexthops, NextHop *in, NextHop **ret) {
+static int nexthop_add_internal(Link *link, Set **nexthops, const NextHop *in, NextHop **ret) {
_cleanup_(nexthop_freep) NextHop *nexthop = NULL;
int r;
return 0;
}
-static int nexthop_add_foreign(Link *link, NextHop *in, NextHop **ret) {
+static int nexthop_add_foreign(Link *link, const NextHop *in, NextHop **ret) {
return nexthop_add_internal(link, &link->nexthops_foreign, in, ret);
}
-static int nexthop_add(Link *link, NextHop *in, NextHop **ret) {
+static int nexthop_add(Link *link, const NextHop *in, NextHop **ret) {
bool is_new = false;
NextHop *nexthop;
int r;
return 1;
}
-static int nexthop_configure(NextHop *nexthop, Link *link) {
+static int nexthop_configure(const NextHop *nexthop, Link *link) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
int r;
link_ref(link);
- r = nexthop_add(link, nexthop, &nexthop);
+ r = nexthop_add(link, nexthop, NULL);
if (r < 0)
return log_link_error_errno(link, r, "Could not add nexthop: %m");