Chris's Wiki :: blog/linux/UdevNetworkdVLANLinkMatching Commentshttps://utcc.utoronto.ca/~cks/space/blog/linux/UdevNetworkdVLANLinkMatching?atomcommentsDWiki2019-12-25T12:17:29ZRecent comments in Chris's Wiki :: blog/linux/UdevNetworkdVLANLinkMatching.By Alex Xu (Hello71) on /blog/linux/UdevNetworkdVLANLinkMatchingtag:CSpace:blog/linux/UdevNetworkdVLANLinkMatching:b2fc766b1ba2b394970e966c70b7524f2db5a68eAlex Xu (Hello71)<div class="wikitext"><p>scanning the list of [Match] options, wouldn't it be possible to just manually specify the Property? that one allows ! negation.</p>
</div>2019-12-25T12:17:29ZFrom 193.219.181.211 on /blog/linux/UdevNetworkdVLANLinkMatchingtag:CSpace:blog/linux/UdevNetworkdVLANLinkMatching:eae247b59c24a20d33e987e0cbae374100c7c90eFrom 193.219.181.211<div class="wikitext"><p>*way too easy</p>
<p>Sigh. It is way too early for me to be online today.</p>
</div>2019-12-25T10:34:03ZFrom 193.219.181.211 on /blog/linux/UdevNetworkdVLANLinkMatchingtag:CSpace:blog/linux/UdevNetworkdVLANLinkMatching:197d4ad3b245ce195c3ef0d9a153a88f6e92df1fFrom 193.219.181.211<div class="wikitext"><p>In a way this problem even predates systemd – even back when renaming was mostly done via handwritten udev rules, it was way too early to forget that VLAN devices share the parent's MAC.</p>
<p>The usual trick used in udev rules is to match the driver against <code>?*</code>, i.e. just ensure it is non-empty (which is always true for Ethernet but never true for vlan).</p>
<p>Oddly, I was sure the .link processor provided a synthetic Type for Ethernet devices as well (the kernel doesn't have one for historical reasons). Will check later.</p>
</div>2019-12-25T10:32:50Z