vlan: fix device vlan alias handling
authorFelix Fietkau <nbd@nbd.name>
Wed, 14 Jul 2021 13:22:09 +0000 (15:22 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 14 Jul 2021 13:24:25 +0000 (15:24 +0200)
commit7f24a063475e1e2be4e0c516a5b62c3fae5ec542
tree5cb7aa818e701c8431bf5add24478494b3591f8f
parent1f283c654aeb1f8983e0a81b7a81cc4784fffe3f
vlan: fix device vlan alias handling

A recent commit changed the vlan chain handling to not treat devices with
non-digit characters after "." as vlan devices. This broke aliases, which
rely on names after the "." component.
Fix dealing with both cases by first trying to set up a vlan regardless
of the non-digit characters, but for the first component allow falling back
to treating the first two parts as a full device name

Fixes: 013a1171e9b0 ("device: do not treat devices with non-digit characters after . as vlan devices")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
vlan.c