diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-20 21:50:56 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-20 21:50:56 +0200 |
commit | 081e23996feb60ad903caf8b0a4587f5dacc69bf (patch) | |
tree | 2bf405bac832b8c4354f2a247e46431dfbcd2dde /op-mode-definitions/include/vtysh-generic-wide.xml.i | |
parent | 672a70613aa6c987bca417f93b587eddccbfd53a (diff) | |
download | vyos-1x-081e23996feb60ad903caf8b0a4587f5dacc69bf.tar.gz vyos-1x-081e23996feb60ad903caf8b0a4587f5dacc69bf.zip |
vyos.ifconfig: get_mac_synthetic() must generate a stable "MAC"
Commit b7d30137b1 ("vyos.ifconfig: provide generic get_mac_synthetic() method")
provided a common helper to generate MAC addresses used by EUI64 addresses for
interfaces not having a layer2 interface (WireGuard or ip tunnel).
The problem is that every call to the helper always yielded a new MAC address.
This becomes problematic when IPv6 link-local addresses are generated and
modified on the interface as multiple link-local (fe80::/64) addresses can
easily be added to the interface leaving ... a mess.
This commit changes the way how the "synthetic" MAC is generated, we generate a
UUID which is stable as it is based on the interface name. We take out the last
48 bits of the UUID and form the "MAC" address.
Diffstat (limited to 'op-mode-definitions/include/vtysh-generic-wide.xml.i')
0 files changed, 0 insertions, 0 deletions