[570] in linux-net channel archive
Fix for Linux
daemon@ATHENA.MIT.EDU (Drew Eckhardt)
Sun Jun 25 01:43:55 1995
To: gated-alpha@gated.cornell.edu
cc: linux-net@vger.rutgers.edu
Date: Sat, 24 Jun 1995 21:38:59 -0600
From: Drew Eckhardt <drew@poohsticks.org>
The following patch against gated 3_5Alpha_11 makes Linux happy when it
cannot intuit a route's mask. In my case, I was running into the problem
when I was adding static routes to a number of SLIP subnets
(netmask 255.255.255.240) through a black-hole device.
Note that gated 3_0_3 needs the same sort of patch.
--- 1.1 1995/06/25 02:32:42
+++ src/krt_rt_ioctl.c 1995/06/25 02:32:44
@@ -60,6 +60,9 @@
bzero((caddr_t) & krt, sizeof(krt));
krt.rt_dst = *sock2unix(dest, (int *) 0); /* struct copy */
krt.rt_gateway = *sock2unix(router, (int *) 0); /* struct copy */
+#ifdef linux
+ krt.rt_genmask = *sock2unix(mask, (int *) 0);
+#endif
krt.rt_flags = krt_state_to_flags(krtp->krtp_state);
if (sockishost(dest, mask)) {
BIT_SET(krt.rt_flags, RTF_HOST);