Re: GateD rdisc, kernel 2.0.36 and MSG_DONTROUTE errors

kuznet@ms2.inr.ac.ru
Sun, 10 Jan 1999 21:54:46 +0300


In article <Pine.LNX.4.03.9901091031130.25198-100000@fuel> you wrote:

: I'm having problems using GateD 3-5-10 rdisc (ICMP Router Discovery
: Protocol - RFC1256) in broadcast mode on Linux 2.0.36. It works fine in
: multicast mode, but when I try to use broadcast I get the following error
: in syslog:

: Jan 5 18:37:37 task_send_packet: task ICMP socket 7 length 16 flags
: MSG_DONTROUTE(4) to 192.168.0.255: Permission denied

You may apply the following patch.

Alexey Kuznetsov

diff -ur --new-file orig/gated-3-5-10/src/icmp.c gated-3-5-10/src/icmp.c
--- orig/gated-3-5-10/src/icmp.c Fri Jul 18 02:41:45 1997
+++ gated-3-5-10/src/icmp.c Mon Dec 21 19:56:03 1998
@@ -572,6 +591,13 @@
icmp_unicast_ttl = ttl);
}
}
+#ifdef __linux__
+ if (ifap->ifa_addr_broadcast &&
+ sockaddrcmp_in (dest, ifap->ifa_addr_broadcast))
+ task_set_option(icmp_task,
+ TASKOPTION_BROADCAST,
+ TRUE);
+#endif

/* send the packet */
rc = task_send_packet(icmp_task,
@@ -593,7 +619,13 @@
ICMP_MAXTYPE,
icmp_trace_masks));
}
-
+#ifdef __linux__
+ if (ifap->ifa_addr_broadcast &&
+ sockaddrcmp_in (dest, ifap->ifa_addr_broadcast))
+ task_set_option(icmp_task,
+ TASKOPTION_BROADCAST,
+ FALSE);
+#endif

return rc;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/