[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#136384: boot-floppies: routing is not automagically set up, when net-installing with plip



tag 136384 patch
thanks

On Sat, Mar 02, 2002 at 02:12:07PM +0000, Philip Blundell wrote:
> On Sat, 2002-03-02 at 10:58, Eduard Bloch wrote:
> > #include <hallo.h>
> > Philip Blundell wrote on Sat Mar 02, 2002 um 10:54:01AM:
> > > > This fill fix the latter problem for sure.  I don't know if we
> > > > will still need to call route, though.
> > > 
> > > No, the kernel should take care of that.
> > 
> > On Ethernet devices, maybe, but for Point-to-Point connection we need
> > exact settings of the peer host.
> 
> What is needed beyond the information that ifconfig provides?
> 
> The kernel is able to install routes like this, which seems to be what
> the submitter wanted:
> 
> kc:/# route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> 192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0
> eth0
> 0.0.0.0         192.168.2.1     0.0.0.0         UG    0      0        0
> eth0
> kc:/# ifconfig plip0 192.168.44.1 pointopoint 192.168.44.2
> kc:/# route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> 192.168.44.2    0.0.0.0         255.255.255.255 UH    0      0        0
> plip0
> 192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0
> eth0
> 0.0.0.0         192.168.2.1     0.0.0.0         UG    0      0        0
> eth0
> kc:/#
> 
> The only route that dbootstrap needs to set up is the default one.  

In that case, could someone please apply the following patch,
and mark 136384 pending?

Matt

    - pass pointopoint option to ifconfig, closes: 136384

--- netconfig.c.orig	Sat Mar  2 07:32:20 2002
+++ netconfig.c	Sat Mar  2 07:33:26 2002
@@ -781,6 +781,10 @@ int activate_static_network()
       strncat(cmdline, IP4tostr(prtbuf, netmask), MAXLINE-strlen(cmdline)-5);
       strncat(cmdline, " broadcast ", MAXLINE-strlen(cmdline)-5);
       strncat(cmdline, IP4tostr(prtbuf, broadcast), MAXLINE-strlen(cmdline)-5);
+      if (has_pointopoint) {
+	strncat(cmdline, " pointopoint ", MAXLINE-strlen(cmdline)-5);
+	strncat(cmdline, IP4tostr(ptrbuf, peer), MAXLINE-strlen(cmdline)-5);
+      }
       ret = execlog(cmdline, LOG_INFO);
       if (has_gw && (ret==0)) {
         snprintf(cmdline, MAXLINE-5, "/sbin/route add default gw %s metric 1",

Attachment: pgpydiUVrtnWi.pgp
Description: PGP signature


Reply to: