[PATCH] ath25: fix preinit Ethernet port configuration

Karl Palsson karlp at tweak.net.au
Thu Sep 10 05:52:12 EDT 2020


Sergey Ryazanov <ryazanov.s.a at gmail.com> wrote:
> On Wed, Sep 9, 2020 at 6:08 PM Adrian Schmutzler
> <mail at adrianschmutzler.de> wrote:
> > > -                             vconfig add eth0 1
> > > +                             ip link add dev eth0.1 link eth0 type vlan id 1
> >
> > Are you sure this is correct?
> 
> Yes, I tested this command with an OpenWrt ip package :)
> 
> > I only find the following syntax:
> >
> > ip link add link eth0 name eth0.1 type vlan id 1
> >
> 
> According to ip-link(8) a user should use 'name' argument for a
> new interface, but in fact the iplink.c have the following code
> in the interface creation handler:
> >         /* Allow "ip link add dev" and "ip link add name" */
> >        if (!name)
> >                name = dev;
> 

Relying on undocumented behaviour seems like a risky move, when
we could just do it the documented way up front?

Sincerely,
Karl Palsson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP-digital-signature.html
Type: application/pgp-signature
Size: 1175 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20200910/adfcda05/attachment.sig>


More information about the openwrt-devel mailing list