connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Passing the --nodevice option multiple times appears to replace the previous values
@ 2023-02-07 22:39 Jade Lovelace
  2023-02-27  7:55 ` Daniel Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: Jade Lovelace @ 2023-02-07 22:39 UTC (permalink / raw)
  To: connman

Hi,

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?

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.

Regards,
Jade

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Passing the --nodevice option multiple times appears to replace the previous values
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Wagner @ 2023-02-27  7:55 UTC (permalink / raw)
  To: Jade Lovelace; +Cc: connman

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-27  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).