summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/interface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/lib/interface.c b/source3/lib/interface.c
index 7ae97e9119..ff7c6ee816 100644
--- a/source3/lib/interface.c
+++ b/source3/lib/interface.c
@@ -48,11 +48,15 @@ static void default_netmask(struct in_addr *inm, struct in_addr *iad)
** Guess a netmask based on the class of the IP address given.
*/
switch((ntohl(iad->s_addr) & 0xE0000000)) {
- case 0: /* Class A addr */
+ case 0x00000000: /* Class A addr */
+ case 0x20000000:
+ case 0x40000000:
+ case 0x60000000:
inm->s_addr = htonl(0xFF000000);
break;
case 0x80000000: /* Class B addr */
+ case 0xA0000000:
inm->s_addr = htonl(0xFFFF0000);
break;