1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Make routed use real netmasks when installing routes; for unknown

class B and C networks routed would use the network number as the
netmask.  This can cause some real interesting behaviour.
This commit is contained in:
Bill Fenner 1996-02-01 16:25:29 +00:00
parent f1956303bb
commit e6ed2afd1e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13821

View File

@ -143,13 +143,13 @@ inet_maskof(inaddr)
} else if (IN_CLASSA(i)) {
mask = IN_CLASSA_NET;
} else if (IN_CLASSB(i)) {
mask = i & IN_CLASSB_NET;
mask = IN_CLASSB_NET;
} else
mask = i & IN_CLASSC_NET;
mask = IN_CLASSC_NET;
/*
* Check whether network is a subnet;
* if so, use the modified interpretation of `host'.
* Check whether network is subnetted;
* if so, use the subnet's netmask.
*/
for (ifp = ifnet; ifp; ifp = ifp->int_next)
if ((ifp->int_netmask & i) == ifp->int_net)