Comment 13 for bug 1567440

Revision history for this message
Stéphane Graber (stgraber) wrote :

You are right that we don't actually have to ask the user to pre-fill some random values. We should however show a warning explaining that those values may conflict with their network and that they should take a close look at them.

So basically the change I would do is: When selecting Yes to the "enable IPv4" or "enable IPv6" questions, and no subnet was already set on the bridge, show the warning message, then pick a random local subnet (RFC1918 for IPv4, local scope for IPv6) and set it. Then continue as usual which will show all the values to the user.

Detecting whether the subnet is in use locally is just broken, there is no way to know whether the subnet is used behind your router and doing IPv4 masking math from a shell script is near impossible so say if you have 10.0.0.0/17 routed, 10.0.3.0/24 is a very bad idea, but figuring that out is a pain. So I would rather we don't pretend to be smart and just be consistently random so people don't depend on us being smart 50% of the time.