lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEzD07JA8+MnQCcRViUxY=TFgeiFn-ZNgkMzvYo06oDuFUMRVA@mail.gmail.com>
Date:   Tue, 11 Jan 2022 22:09:45 +0300
From:   Anton Danilov <littlesmilingcloud@...il.com>
To:     David Ahern <dsahern@...il.com>
Cc:     Stephen Hemminger <stephen@...workplumber.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2 v2] ip: Extend filter links/addresses

Hello, David.

> current 'type' filtering is the 'kind' string in the rtnl_link_ops --
> bridge, veth, vlan, vrf, etc. You are now wanting to add 'exclude_type'
> and make it based on hardware type. That is a confusing user api.

The 'exclude_type' options first checks the 'kind' in the
rtnl_link_ops, then the hardware type.

> What type of interface filtering is motivating this change? e.g., link /
> address lists but ignoring say vlan or veth devices?

Yep, sure. If you use the kvm hypervisors, you can see a lot of veth
devices. I think an ability to hide them is a good feature.

Filtering by 'kind' value has not been touched.


On Tue, 11 Jan 2022 at 19:35, David Ahern <dsahern@...il.com> wrote:
>
> On 1/8/22 12:58 PM, Anton Danilov wrote:
> > @@ -227,6 +227,28 @@ static int match_link_kind(struct rtattr **tb, const char *kind, bool slave)
> >       return strcmp(parse_link_kind(tb[IFLA_LINKINFO], slave), kind);
> >  }
> >
> > +static int match_if_type_name(unsigned short if_type, const char *type_name)
> > +{
> > +
> > +     char *expected_type_name;
> > +
> > +     switch (if_type) {
> > +     case ARPHRD_ETHER:
> > +             expected_type_name = "ether";
> > +             break;
> > +     case ARPHRD_LOOPBACK:
> > +             expected_type_name = "loopback";
> > +             break;
> > +     case ARPHRD_PPP:
> > +             expected_type_name = "ppp";
> > +             break;
> > +     default:
> > +             expected_type_name = "";
> > +     }
> > +
> > +     return !strcmp(type_name, expected_type_name);
>
> current 'type' filtering is the 'kind' string in the rtnl_link_ops --
> bridge, veth, vlan, vrf, etc. You are now wanting to add 'exclude_type'
> and make it based on hardware type. That is a confusing user api.
>
> What type of interface filtering is motivating this change? e.g., link /
> address lists but ignoring say vlan or veth devices?



-- 
Anton Danilov.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ