From: Luca Boccassi Date: Wed, 10 Jan 2024 19:34:48 +0000 (+0000) Subject: Merge pull request #30717 from yuwata/network-ref-unref X-Git-Tag: v256-rc1~1199 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6b39152a94ab0bea887617c41efded055c8a315;p=thirdparty%2Fsystemd.git Merge pull request #30717 from yuwata/network-ref-unref network: introduce address_ref() and friends --- d6b39152a94ab0bea887617c41efded055c8a315 diff --cc src/network/networkd-neighbor.h index 0d1216c21c7,4a5503ca13f..93b3927f02c --- a/src/network/networkd-neighbor.h +++ b/src/network/networkd-neighbor.h @@@ -26,11 -28,9 +28,12 @@@ typedef struct Neighbor struct hw_addr_data ll_addr; } Neighbor; - Neighbor *neighbor_free(Neighbor *neighbor); + Neighbor* neighbor_ref(Neighbor *neighbor); + Neighbor* neighbor_unref(Neighbor *neighbor); +int neighbor_get(Link *link, const Neighbor *in, Neighbor **ret); +int neighbor_remove(Neighbor *neighbor, Link *link); + int network_drop_invalid_neighbors(Network *network); int link_drop_managed_neighbors(Link *link); diff --cc src/network/networkd-nexthop.h index 6bc736f54e2,f79eda5cb1e..bc2bacfa40d --- a/src/network/networkd-nexthop.h +++ b/src/network/networkd-nexthop.h @@@ -35,10 -37,9 +37,11 @@@ typedef struct NextHop Hashmap *group; } NextHop; - NextHop *nexthop_free(NextHop *nexthop); + NextHop* nexthop_ref(NextHop *nexthop); + NextHop* nexthop_unref(NextHop *nexthop); +int nexthop_remove(NextHop *nexthop, Manager *manager); + int network_drop_invalid_nexthops(Network *network); int link_drop_nexthops(Link *link, bool foreign);