Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 2025 15:26:08 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Kristof Provost <kp@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: da50f49977cc - main - ifconfig: fix removing IPv6 addresses
Message-ID:  <eaa72412-eb20-4552-88d4-157b42bbccc1@FreeBSD.org>
In-Reply-To: <202507291313.56TDDQFb089337@gitrepo.freebsd.org>
References:  <202507291313.56TDDQFb089337@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Should this also be done for WITHOUT_NETLINK?

> diff --git sbin/ifconfig/af_inet6.c sbin/ifconfig/af_inet6.c
> index 7986edf490b4..e0f34f0c4d82 100644
> --- sbin/ifconfig/af_inet6.c
> +++ sbin/ifconfig/af_inet6.c
> @@ -753,7 +753,7 @@ static struct afswtch af_inet6 = {
>  #ifdef WITHOUT_NETLINK
>         .af_difaddr     = SIOCDIFADDR_IN6,
>         .af_aifaddr     = SIOCAIFADDR_IN6,
> -       .af_ridreq      = &in6_addreq,
> +       .af_ridreq      = &in6_ridreq,
>         .af_addreq      = &in6_addreq,
>         .af_exec        = af_exec_ioctl,
>  #else


On 7/29/25 6:13 AM, Kristof Provost wrote:
> The branch main has been updated by kp:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=da50f49977cc4e6aae55cb2379313599249a8dd2
>
> commit da50f49977cc4e6aae55cb2379313599249a8dd2
> Author:     Kristof Provost <kp@FreeBSD.org>
> AuthorDate: 2025-07-29 09:50:11 +0000
> Commit:     Kristof Provost <kp@FreeBSD.org>
> CommitDate: 2025-07-29 13:13:09 +0000
>
>      ifconfig: fix removing IPv6 addresses
>      
>      Sponsored by:   Rubicon Communications, LLC ("Netgate")
> ---
>   sbin/ifconfig/af_inet6.c     |  2 +-
>   sbin/ifconfig/tests/inet6.sh | 30 ++++++++++++++++++++++++++++++
>   2 files changed, 31 insertions(+), 1 deletion(-)
>
> diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c
> index 17dc068ee875..7986edf490b4 100644
> --- a/sbin/ifconfig/af_inet6.c
> +++ b/sbin/ifconfig/af_inet6.c
> @@ -759,7 +759,7 @@ static struct afswtch af_inet6 = {
>   #else
>   	.af_difaddr	= NL_RTM_DELADDR,
>   	.af_aifaddr	= NL_RTM_NEWADDR,
> -	.af_ridreq	= &in6_add,
> +	.af_ridreq	= &in6_del,
>   	.af_addreq	= &in6_add,
>   	.af_exec	= in6_exec_nl,
>   #endif
> diff --git a/sbin/ifconfig/tests/inet6.sh b/sbin/ifconfig/tests/inet6.sh
> index edfd88d93af7..22399915a64d 100644
> --- a/sbin/ifconfig/tests/inet6.sh
> +++ b/sbin/ifconfig/tests/inet6.sh
> @@ -76,8 +76,38 @@ broadcast_cleanup()
>   	vnet_cleanup
>   }
>   
> +atf_test_case "delete6" "cleanup"
> +delete6_head()
> +{
> +	atf_set descr 'Test removing IPv6 addresses'
> +	atf_set require.user root
> +}
> +
> +delete6_body()
> +{
> +	vnet_init
> +
> +	ep=$(vnet_mkepair)
> +
> +	atf_check -s exit:0 \
> +	    ifconfig ${ep}a inet6 fe80::42/64
> +	atf_check -s exit:0 -o match:"fe80::42%${ep}" \
> +	    ifconfig ${ep}a inet6
> +
> +	atf_check -s exit:0 \
> +	    ifconfig ${ep}a inet6 -alias fe80::42
> +	atf_check -s exit:0 -o not-match:"fe80::42%${ep}" \
> +	    ifconfig ${ep}a inet6
> +}
> +
> +delete6_cleanup()
> +{
> +	vnet_cleanup
> +}
> +
>   atf_init_test_cases()
>   {
>   	atf_add_test_case netmask
>   	atf_add_test_case broadcast
> +	atf_add_test_case delete6
>   }





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eaa72412-eb20-4552-88d4-157b42bbccc1>