mirror of
https://github.com/gryf/wicd.git
synced 2025-12-21 05:18:02 +01:00
Autofill common subnet masks for private networks
This commit is contained in:
@@ -184,6 +184,12 @@ class AdvancedSettingsDialog(gtk.Dialog):
|
|||||||
# Make sure the netmask is blank
|
# Make sure the netmask is blank
|
||||||
if stringToNone(netmask.get_text()) is None:
|
if stringToNone(netmask.get_text()) is None:
|
||||||
# Fill in the most common one
|
# Fill in the most common one
|
||||||
|
if ip.startswith('172'):
|
||||||
|
netmask.set_text('255.240.0.0')
|
||||||
|
elif ip.startswith('10'):
|
||||||
|
netmask.set_text('255.0.0.0')
|
||||||
|
else:
|
||||||
|
# 192.168 and all other cases
|
||||||
netmask.set_text('255.255.255.0')
|
netmask.set_text('255.255.255.0')
|
||||||
elif ip != '':
|
elif ip != '':
|
||||||
error(None, _('Invalid IP address entered.'))
|
error(None, _('Invalid IP address entered.'))
|
||||||
|
|||||||
Reference in New Issue
Block a user