lkml.org 
[lkml]   [1996]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] kerneld demand dialing for 2.1.15

The following patch re-enables kerneld's dynamic route request
feature in 2.1.15.

Rob
(rriggs@tesser.com)


--- linux-2.1.5/net/ipv4/route.c Sun Dec 15 05:09:51 1996
+++ linux/net/ipv4/route.c Sun Dec 15 05:16:22 1996
@@ -78,6 +78,10 @@
#include <net/sock.h>
#include <net/icmp.h>
#include <linux/net_alias.h>
+
+#ifdef CONFIG_KERNELD
+#include <linux/kerneld.h>
+#endif

static void rt_run_flush(unsigned long);

@@ -1210,8 +1214,18 @@
}
#else
fi = fib_lookup_info(daddr, 0, tos, &loopback_dev, dev_out);
- if (!fi)
+ if (!fi) {
+#ifdef CONFIG_KERNELD
+ char wanted_route[20];
+
+ daddr = ntohl(daddr);
+ sprintf(wanted_route, "%d.%d.%d.%d",
+ (int)(daddr >> 24) & 0xff, (int)(daddr >> 16) & 0xff,
+ (int)(daddr >> 8) & 0xff, (int)daddr & 0xff);
+ kerneld_route(wanted_route); /* Dynamic route request */
+#endif
return -ENETUNREACH;
+ }

if (fi->fib_flags&RTF_NAT)
return -EINVAL;
\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.030 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site