summaryrefslogtreecommitdiffstats
path: root/usr.sbin/routed
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>1996-02-01 16:25:29 +0000
committerfenner <fenner@FreeBSD.org>1996-02-01 16:25:29 +0000
commit5f45605dbe8a766fb29d2a77b04e8027a980ff92 (patch)
tree5ea9da8af99f76f6801530d0e664e5885bdbe3e9 /usr.sbin/routed
parent01dd9d5479958250ef037a3f66ca2a638931875b (diff)
downloadFreeBSD-src-5f45605dbe8a766fb29d2a77b04e8027a980ff92.zip
FreeBSD-src-5f45605dbe8a766fb29d2a77b04e8027a980ff92.tar.gz
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.
Diffstat (limited to 'usr.sbin/routed')
-rw-r--r--usr.sbin/routed/inet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/routed/inet.c b/usr.sbin/routed/inet.c
index 925472c..9b1c9fd 100644
--- a/usr.sbin/routed/inet.c
+++ b/usr.sbin/routed/inet.c
@@ -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)
OpenPOWER on IntegriCloud