From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH v2 4/8] netconfig: Subscribe for IPv6 address changes
Date: Mon, 30 Sep 2019 15:13:04 -0500 [thread overview]
Message-ID: <d35cb892-f918-08f1-e88d-b2f178339da5@gmail.com> (raw)
In-Reply-To: <20190930163558.28123-4-tim.a.kourt@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
Hi Tim,
On 9/30/19 11:35 AM, Tim Kourt wrote:
> The IPv6 addresses changes are maintained in ifaddr_list.
> ---
> src/netconfig.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 74 insertions(+)
>
<snip>
> +static void netconfig_ifaddr_ipv6_deleted(struct netconfig *netconfig,
> + const struct ifaddrmsg *ifa,
> + uint32_t len)
> +{
> + struct netconfig_ifaddr *ifaddr;
> + char *ip;
> +
> + rtnl_ifaddr_ipv6_extract(ifa, len, &ip);
> +
> + ifaddr = netconfig_ifaddr_find(netconfig, ifa->ifa_family,
> + ifa->ifa_prefixlen, ip);
> +
> + l_free(ip);
> +
> + if (!ifaddr)
> + return;
Can we use l_queue_remove_if instead here to avoid walking the list twice?
> +
> + l_debug("ifaddr %s/%u", ifaddr->ip, ifaddr->prefix_len);
> +
> + l_queue_remove(netconfig->ifaddr_list, ifaddr);
> +
> + netconfig_ifaddr_destroy(ifaddr);
> +}
> +
Regards,
-Denis
next prev parent reply other threads:[~2019-09-30 20:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 16:35 [PATCH v2 1/8] netconfig: Decouple from station state Tim Kourt
2019-09-30 16:35 ` [PATCH v2 2/8] station: netconfig devices based on " Tim Kourt
2019-09-30 16:35 ` [PATCH v2 3/8] netconfig: Switch to internal active network settings Tim Kourt
2019-09-30 16:35 ` [PATCH v2 4/8] netconfig: Subscribe for IPv6 address changes Tim Kourt
2019-09-30 20:13 ` Denis Kenzior [this message]
2019-09-30 16:35 ` [PATCH v2 5/8] netconfig: Request all known IPv6 addresses Tim Kourt
2019-09-30 16:35 ` [PATCH v2 6/8] netconfig: Add IPv6 static address installation/removal Tim Kourt
2019-09-30 16:35 ` [PATCH v2 7/8] netconfig: Install IPv6 default route Tim Kourt
2019-09-30 16:35 ` [PATCH v2 8/8] netconfig: Install IPv6 DNS Tim Kourt
2019-09-30 20:12 ` [PATCH v2 1/8] netconfig: Decouple from station state Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d35cb892-f918-08f1-e88d-b2f178339da5@gmail.com \
--to=denkenz@gmail.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox