How does changing a network interface's MAC address (ifconfig eth2 hw ether BB:BB:BB:BB:BB:BB) affect a NIC that isn't in promiscuous mode?
When I use ifconfig to change my network card's MAC, it is reverted to the original MAC after a reboot. As far as I understand, it means that the network card has its original MAC saved in its own nonvolatile memory and Linux reads this original MAC every time it boots. It must mean that ifconfig does not change the MAC's value saved in NIC's own nonvolatile memory. This value is left untouched.
Nevertheless, when I change the MAC with ifconfig, Linux starts sending Ethernet frames with this new MAC as source-MAC.
From what I have learnt, a NIC that is not in so called "promiscuous mode" rejects all Ethernet frames whose destination MAC addresses differ from the NIC's MAC address (unless it's broadcast or multicast). It means that Linux will not even see those frames. They will be dropped before reaching the CPU. I suppose the NIC does this job by checking the Ethernet frame's destination MAC address against the NIC's MAC address saved in NIC's own nonvolatile memory.
Now there comes an issue that I don't understand. Since NIC uses its internally saved original MAC to decide whether to drop a frame before passing it to the CPU, and Linux may use a totally different MAC as source MAC for outgoing frames, then how does a response to such frames reach Linux?
What do I misunderstand in this topic?
I will present an example to better describe what I mean.
NIC has AA:AA:AA:AA:AA:AA stored in its own internal nonvolatile memory as its original MAC. It is not in promiscuous mode, so it prevents all frames not containing AA:AA:AA:AA:AA:AA as the destination MAC from reaching the CPU (and Linux). Now someone types: ifconfig eth2 hw ether BB:BB:BB:BB:BB:BB. From now on, outgoing frames sent by Linux from this interface will have BB:BB:BB:BB:BB:BB as source MAC. Eventually another host will reply to this frame by sending a frame with BB:BB:BB:BB:BB:BB as destination MAC. Such a frame will arrive to the first host's NIC. What will the NIC do now? It will compare BB:BB:BB:BB:BB:BB with AA:AA:AA:AA:AA:AA (stored internally in NIC's ROM) and decide not to pass it to the CPU?!? So the frame will never reach Linux?
Where's the catch?