lkml.org 
[lkml]   [1997]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Bootp fails to add default route?

This is a known problem, I have a quick fix, this will go into 2.1.38:

--- linux/fs/nfs/nfsroot.c.~1~ Tue May 6 03:35:19 1997
+++ linux/fs/nfs/nfsroot.c Wed May 14 03:04:24 1997
@@ -247,9 +249,15 @@
set_fs(KERNEL_DS);
err = ip_rt_ioctl(op, &route);
set_fs(oldfs);
- printk(KERN_NOTICE "%s route %s %s %s: res %d\n",
- (op == SIOCADDRT? "add" : "del"),
- in_ntoa(dest), in_ntoa(mask), in_ntoa(gw), err);
+
+ /* in_ntoa in ipv4/utils.c uses a single static buffer, so
+ * must make multiple printk calls, one for each in_ntoa
+ * invocation...
+ */
+ printk(KERN_NOTICE "%s route ", (op == SIOCADDRT ? "addr" : "del"));
+ printk("%s ", in_ntoa(dest));
+ printk("%s ", in_ntoa(mask));
+ printk("%s: res %d\n", in_ntoa(gw), err);

return err;
}
@@ -1322,6 +1332,13 @@
root_dev->pa_mask = netmask;
root_dev->pa_brdaddr = root_dev->pa_addr | ~root_dev->pa_mask;
root_dev->pa_dstaddr = 0;
+
+ /* Sticky situation, but it has a solution. We opened it earlier,
+ * but before we knew what pa_addr etc. to give to it, thus the
+ * routing code did not add a RTF_LOCAL route for it (how could
+ * it?) so we send the pseudo device state change event now. -DaveM
+ */
+ ip_rt_event(NETDEV_CHANGE, root_dev);

/*
* Now add a route to the server. If there is no gateway given,
\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.102 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site