home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC-Online 1998 February
/
PCOnline_02_1998.iso
/
linux
/
kernel-2.1.33.dial_on_demand_patch
next >
Wrap
Text File
|
1998-01-06
|
1KB
|
47 lines
--- linux/net/ipv4/route.c.orig Sun Apr 13 18:58:49 1997
+++ linux/net/ipv4/route.c Sun Apr 13 23:43:02 1997
@@ -77,6 +77,9 @@
#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/icmp.h>
+#ifdef CONFIG_KERNELD
+#include <linux/kerneld.h>
+#endif
#include <linux/net_alias.h>
/* Compile time configuretion flags */
@@ -1315,6 +1318,7 @@
int ip_route_output(struct rtable **rp, u32 daddr, u32 saddr, u8 tos, struct device *dev_out)
{
unsigned hash;
+ int ipsl;
struct rtable *rth;
hash = rt_hash_code(daddr, dev_out ? saddr^(dev_out->ifindex<<5)
@@ -1337,7 +1341,24 @@
}
end_bh_atomic();
- return ip_route_output_slow(rp, daddr, saddr, tos, dev_out);
+ ipsl=ip_route_output_slow(rp, daddr, saddr, tos, dev_out);
+#ifdef CONFIG_KERNELD
+ if ( ipsl == -ENETUNREACH )
+ {
+ char wanted_route[20];
+ union ippp_u
+ {
+ long ipaddr;
+ unsigned char caddr[4];
+ } ippp;
+ ippp.ipaddr = ntohl(daddr);
+ sprintf(wanted_route,"%d.%d.%d.%d",ippp.caddr[3],
+ ippp.caddr[2],ippp.caddr[1],ippp.caddr[0]);
+ kerneld_route(wanted_route);
+ ipsl=ip_route_output_slow(rp, daddr, saddr, tos, dev_out);
+ }
+#endif
+ return ipsl;
}
int ip_route_output_dev(struct rtable **rp, u32 daddr, u32 saddr, u8 tos, int ifindex)