assured correct supernode MAC address properties (#888)

This commit is contained in:
Logan oos Even 2021-11-02 00:01:44 +05:45 committed by GitHub
parent e0a9bb95fc
commit 81bd79a82a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,7 +290,13 @@ static int setOption (int optkey, char *_optarg, n2n_sn_t *sss) {
}
#ifdef SN_MANUAL_MAC
case 'm': {/* MAC address */
str2mac(sss->mac_addr,_optarg);
str2mac(sss->mac_addr, _optarg);
// clear multicast bit
sss->mac_addr[0] &= ~0x01;
// set locally-assigned bit
sss->mac_addr[0] |= 0x02;
break;
}
#endif