macchanger 1.6.0 added -b / --bia option to control whether locally administered bit should be set on the randomly generated MACs. If this option is specified, locally administered bit is cleared, and it's set otherwise.
This option is considered when generating fully random MAC (-r / --random), but also when setting random vendor MACs (-e / --endding, -a / --another, -A). As locally administered bit is part of the first MAC octet, which is part of OUI, clearing the bit (default behaviour when -b is not used) breaks all these random vendor MAC modes, setting MACs that are not for any recognized vendor.
Examples:
# macchanger -e eth0
Current MAC: 00:00:0c:aa:bb:cc (Cisco Systems, Inc.)
Permanent MAC: ...
New MAC: 02:00:0c:a6:f7:9d (unknown)
# macchanger -a eth0
Current MAC: 00:00:0c:aa:bb:cc (Cisco Systems, Inc.)
Permanent MAC: ...
New MAC: b6:04:18:e9:09:e5 (unknown)
# macchanger -A eth0
Current MAC: 00:00:0c:aa:bb:cc (Cisco Systems, Inc.)
Permanent MAC: ...
New MAC: c2:12:42:50:67:a8 (unknown)
All of the above now require -b option to be specified to work correctly.
BIA command line option should only be honored when setting fully random MAC. All OUI / vendor MACs are expected to have locally administered bit cleared. Hence my fix is to call mc_mac_random() with set_bia set to 1 unconditionally when setting random vendor MAC. I've also added warning printed when -b is not used in conjunction with -r.
macchanger 1.6.0 added -b / --bia option to control whether locally administered bit should be set on the randomly generated MACs. If this option is specified, locally administered bit is cleared, and it's set otherwise.
This option is considered when generating fully random MAC (-r / --random), but also when setting random vendor MACs (-e / --endding, -a / --another, -A). As locally administered bit is part of the first MAC octet, which is part of OUI, clearing the bit (default behaviour when -b is not used) breaks all these random vendor MAC modes, setting MACs that are not for any recognized vendor.
Examples:
All of the above now require -b option to be specified to work correctly.
BIA command line option should only be honored when setting fully random MAC. All OUI / vendor MACs are expected to have locally administered bit cleared. Hence my fix is to call mc_mac_random() with set_bia set to 1 unconditionally when setting random vendor MAC. I've also added warning printed when -b is not used in conjunction with -r.