halo/LinkLiar

Warn user about the possibility of loosing connection

Closed this issue · 1 comments

halo commented

From @GnrGnr extracted from this issue

When changing the MAC address, the current (wifi) connection becomes unusable. The network adapter probably has to renegotiate its connection once the MAC address changes. If this is the standard procedure, it would be much more convenient to the user if LinkLiar kills the ethernet/wifi connection(s) and re-establishes it once a MAC address change has been initiated by the user. The "suddenly unusable network connection" could become a major headache for people forgetting (or not knowing) that they have to re-establish their network connection. A quick drop and re-connect by LinkLiar could probably avoid this.

halo commented

You are right, once the MAC address changes, network packets don't arrive at their destination any longer. Let's say you have a modem in your LAN which is connected to a switch where all your computers are plugged in. The switch will actually remember which MAC address is connected to which port and deliver the packets sent by the modem only to that port where it knows the computer with that MAC is located. Changing the MAC address on-the-fly is a little bit like suddenly moving to another apartment and not telling your friends what your new home address is :) More over, the postman still remembers your old address and will keep sending your mail there.

I don't think there is any trivial way to "reconnect" other than to turn off and on the interface or to unplug the cable for a moment. In the real world you would tell your friends your new address. But here the only thing you can do is to tell them: "Look, I don't know which guy you remembered to be your friend earlier and I don't care. I am a totally different person, would you like to establish a friendship with me anyway? This is where I live." The modem doesn't know you're the same person. It will establish a brand new connection with you.

Now, I don't want to be intrusive and turn on or off interfaces just like that. I will not even turn on the Wi-Fi so that you can change your MAC address in the first place, you'll have to turn it on yourself. For me, this has to do with predictability, I guess. Do one thing and do it well - that is, changing MAC addresses. Not turning on and off interfaces :) As a matter of fact, only in recent versions of Mac OS can a Wi-Fi MAC be changed at all while the connection is established. Earlier you'd have to disassociate before ifconfig would make any changes.

For now, I don't think I will do anything more about it than mentioning it in the troubleshooting. Or maybe I should bring up a message at least which says "You are currently connected to a Wi-Fi, changing the MAC address might now have disconnected you..." with buttons "Don't ask again" and "OK". So power-users won't get disturbed by the popups.

I guess I can do that!