ConnMan network manager
 help / color / mirror / Atom feed
From: Jussi Laakkonen <jussi.laakkonen@jolla.com>
To: connman@lists.linux.dev
Subject: Re: [PATCH] vpn-provider: Compare using lowercase of type value in set_string()
Date: Fri, 10 Apr 2026 14:02:08 +0300	[thread overview]
Message-ID: <077e2d95-ddab-4326-b8c4-2c4e5913018a@jolla.com> (raw)
In-Reply-To: <20260410105840.1521646-1-jussi.laakkonen@jolla.com>

Hi all,

Heh, I thought the email was lost in translation again, this is 
identical without Frank being as CC as I thought it being the reason for 
rejectal, hence other patch I sent went through fast.

Please ignore this one.

Cheers,
  Jussi


On 4/10/26 1:58 PM, Jussi Laakkonen wrote:
> The VPN type value is always converted to lowercase. When the type is
> set via set_string() the comparison must be done also with lowercase.
> The issue was introduced in commit 3aa13afdf706dee92f657bf6799d6bd97b81da4d
> 
> Reported by Frank Liepert <f.liepert@meteocontrol.com>
> ---
>   vpn/vpn-provider.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c
> index dafdaffa..2833d249 100644
> --- a/vpn/vpn-provider.c
> +++ b/vpn/vpn-provider.c
> @@ -2754,11 +2754,14 @@ static int set_string(struct vpn_provider *provider,
>   		hide_value ? "<not printed>" : value);
>   
>   	if (g_str_equal(key, "Type")) {
> -		if (!g_strcmp0(provider->type, value))
> +		char *type = g_ascii_strdown(value, -1);
> +		if (!g_strcmp0(provider->type, type)) {
> +			g_free(type);
>   			return -EALREADY;
> +		}
>   
>   		g_free(provider->type);
> -		provider->type = g_ascii_strdown(value, -1);
> +		provider->type = type;
>   		send_value(provider->path, "Type", provider->type);
>   	} else if (g_str_equal(key, "Name")) {
>   		if (!g_strcmp0(provider->name, value))


  reply	other threads:[~2026-04-10 11:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 10:58 [PATCH] vpn-provider: Compare using lowercase of type value in set_string() Jussi Laakkonen
2026-04-10 11:02 ` Jussi Laakkonen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-04-10 10:19 Jussi Laakkonen

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=077e2d95-ddab-4326-b8c4-2c4e5913018a@jolla.com \
    --to=jussi.laakkonen@jolla.com \
    --cc=connman@lists.linux.dev \
    /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