Store mac in big-endian order in DeviceKey
This was a bug. The intention was to store it in big endian, so that the sort order for devices would be VLANs+Mac. Fixes #289
This commit is contained in:
parent
79ac3a2a20
commit
bfc5477807
@ -85,7 +85,7 @@ void Device::setMac(quint64 mac)
|
||||
int ofs = kMaxVlan * sizeof(quint16);
|
||||
|
||||
mac_ = mac & ~(0xffffULL << 48);
|
||||
memcpy(key_.data() + ofs, (char*)&mac_, sizeof(mac_));
|
||||
qToBigEndian(mac_, key_.data()+ofs);
|
||||
}
|
||||
|
||||
void Device::setIp4(quint32 address, int prefixLength, quint32 gateway)
|
||||
|
Loading…
Reference in New Issue
Block a user