summaryrefslogtreecommitdiffstats
path: root/source/lib/interface.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-01-07 06:21:56 +0000
committerJeremy Allison <jra@samba.org>1998-01-07 06:21:56 +0000
commit28aff043c4a3693a0c20e87c7ce11eb4bf285b78 (patch)
treecaa3bf7cd5cf65610d3f8f8fe5c233cf106e97c8 /source/lib/interface.c
parent800510a852db046bf88a88c966c80d71b474f4ef (diff)
downloadsamba-28aff043c4a3693a0c20e87c7ce11eb4bf285b78.tar.gz
samba-28aff043c4a3693a0c20e87c7ce11eb4bf285b78.tar.xz
samba-28aff043c4a3693a0c20e87c7ce11eb4bf285b78.zip
includes.h: Added FreeBSD 3.x fixes. Added HPUX10.x fixes.
interface.c: Added netmask fix. nmbd_nameregister.c: Fixed unitialised variable warnings. nmbd_winsproxy.c: Fixed unitialised variable warnings. nmbd_winsserver.c: Fixed DEC warnings. print_svid.c: Fixed DEC warnings. printing.c: Added LPRng fixes. Jeremy.
Diffstat (limited to 'source/lib/interface.c')
-rw-r--r--source/lib/interface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/lib/interface.c b/source/lib/interface.c
index 7ae97e91190..ff7c6ee816f 100644
--- a/source/lib/interface.c
+++ b/source/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;