summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-ipv6-proxy-ndp.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-02-26 07:56:39 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-03-11 06:16:41 +0100
commitff51134c93a748524b75b4fd492f9c03cb02f65c (patch)
treeaa4dd86f335acceeecb3de90f3ae9fb2f466892d /src/network/networkd-ipv6-proxy-ndp.c
parentnetwork: make address_configure() and friends take Request object (diff)
downloadsystemd-ff51134c93a748524b75b4fd492f9c03cb02f65c.tar.xz
systemd-ff51134c93a748524b75b4fd492f9c03cb02f65c.zip
network: make request_process_address() and friends take Link and corresponding object
This also renames e.g. request_process_address() -> address_process_request(). Also, this drops type checks such as `assert(req->type == REQUEST_TYPE_ADDRESS)`, as in the later commits, the function of processing request, e.g. `address_process_request()`, will be assigned to the Request object when it is created. And the request type will be used to distinguish and to avoid deduplicating requests which do not have any assigned objects, like REQUEST_TYPE_DHCP4_CLIENT. Hence, the type checks in process functions are mostly not necessary and redundant. This is mostly cleanups and preparation for later commits, and should not change any behavior.
Diffstat (limited to 'src/network/networkd-ipv6-proxy-ndp.c')
-rw-r--r--src/network/networkd-ipv6-proxy-ndp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/network/networkd-ipv6-proxy-ndp.c b/src/network/networkd-ipv6-proxy-ndp.c
index 5844273be9..def456c9aa 100644
--- a/src/network/networkd-ipv6-proxy-ndp.c
+++ b/src/network/networkd-ipv6-proxy-ndp.c
@@ -80,19 +80,17 @@ static int ipv6_proxy_ndp_address_configure(const struct in6_addr *address, Link
return 0;
}
-int request_process_ipv6_proxy_ndp_address(Request *req) {
- Link *link;
+int ipv6_proxy_ndp_address_process_request(Request *req, Link *link, struct in6_addr *address) {
int r;
assert(req);
- assert(req->ipv6_proxy_ndp);
- assert(req->type == REQUEST_TYPE_IPV6_PROXY_NDP);
- assert_se(link = req->link);
+ assert(link);
+ assert(address);
if (!link_is_ready_to_configure(link, false))
return 0;
- r = ipv6_proxy_ndp_address_configure(req->ipv6_proxy_ndp, link, req);
+ r = ipv6_proxy_ndp_address_configure(address, link, req);
if (r < 0)
return log_link_warning_errno(link, r, "Failed to configure IPv6 proxy NDP address: %m");