connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Daniel Wagner <wagi@monom.org>
To: Jade Lovelace <jade@jade.fyi>
Cc: connman@lists.linux.dev
Subject: Re: Passing the --nodevice option multiple times appears to replace the previous values
Date: Mon, 27 Feb 2023 08:55:20 +0100	[thread overview]
Message-ID: <20230227075520.zaf3dte3cjckyake@carbon.lan> (raw)
In-Reply-To: <CAFA9we8U1=_7gkiPuXUS2P1n5Bb1=7s5mNCsJf6-7G6vryZ0Rw@mail.gmail.com>

Hi Jade,

On Tue, Feb 07, 2023 at 02:39:32PM -0800, Jade Lovelace wrote:
> I have been running into a frustrating issue where the connman
> interface ignore lists are misbehaving for me. I was invoking connman
> like so:
> 
> ExecStart=/nix/store/k479wdfq88g5qfhlkpr6maqfzj5q8jf6-connman-1.41/sbin/connmand
> --config=/nix/store/z07f0rkb95d8zjba99pjcy6v7152y5qi-connman.conf
> --nodaemon --wifi=iwd_agent --nodevice=en --nodevice=eth
> --nodevice=tailscale0 --debug=plugins/iwd.c --nodevice=veth
> --nodevice=hostonly
> 
> This had surprising implications in that it seemed like the nodevice
> options were having no observable effect. I went spelunking in the
> source code and found that there seems to be no combining logic for
> the "nodevice" option if specified multiple times, although I may be
> misunderstanding it. Is this intended behaviour?

The argument parser expects it in the form of

  --nodevice=en,eth,tailscale0,veth,hostonly

As far I can tell from quickly looking at the code, the last argument
will win. The filter logic is in

   __connman_device_isfiltered()

BTW veth is already in the global ignore list.

> Also, the man page doesn't seem to adequately describe the behaviour
> of the nodevice option: it is unclear that it uses wildcard matching
> with g_pattern_match_simple from the wording:
> 
> > -I interface[,...], --nodevice=interface[,...]
> >   Never manage these network interfaces.

Yeah, not very good indeed. We could use the same wording as for --noplugin.

Thanks,
Daniel

      reply	other threads:[~2023-02-27  7:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 22:39 Passing the --nodevice option multiple times appears to replace the previous values Jade Lovelace
2023-02-27  7:55 ` Daniel Wagner [this message]

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=20230227075520.zaf3dte3cjckyake@carbon.lan \
    --to=wagi@monom.org \
    --cc=connman@lists.linux.dev \
    --cc=jade@jade.fyi \
    /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;
as well as URLs for NNTP newsgroup(s).