[2141] in linux-net channel archive
Re: Diald-0.13 woes with 1.3.75 and half-dynamic address
daemon@ATHENA.MIT.EDU (Kevin Buettner)
Mon Mar 18 21:24:35 1996
From: Kevin Buettner <kev@primenet.com>
To: jam@mnsinc.com
Date: Mon, 18 Mar 1996 15:31:02 -0700 (MST)
Cc: schenk@cs.toronto.edu, kev@primenet.com, linux-net@vger.rutgers.edu,
linux-diald@vger.rutgers.edu
In-Reply-To: <199603182041.PAA01255@athene.mnsinc.com> from "jam@mnsinc.com" at Mar 18, 96 03:41:13 pm
Reply-To: kev@primenet.com
> My diad-0.13 on kernel 1.3.75 seems to have the same problems with a
> fixed local but dynamic remote address as reported for kernels
> 1.3.7[2,3] but the 'reroute' option seems to have no effect. 0.13
> works fine on 1.3.70 without 'reroute' as this mail demonstrates. I
> have not tried kernels 1.3.7[1-4] with diald-0.13.
Eric has been hard at work on this. He has sent me some test patches to
try on my system... I think that we have about two or three different
ways of solving the problem. I am running one of the patched diald-0.13
versions now and it seems to be working pretty well, so it seems that
a fix is in sight.
BTW, 1.3.75 still has some problems with respect to getting older versions
of diald running again (like 0.11). Here is the patch that I'm using at
the moment; cd to linux/net/ipv4 and then apply:
--- packet.c-orig Sun Mar 17 12:11:55 1996
+++ packet.c Sun Mar 17 12:12:38 1996
@@ -130,7 +130,7 @@
struct sk_buff *skb;
struct device *dev;
struct sockaddr_pkt *saddr=(struct sockaddr_pkt *)msg->msg_name;
- unsigned short proto=0;
+ unsigned short proto=htons(ETH_P_IP);
/*
* Check the flags.
@@ -148,7 +148,7 @@
if (msg->msg_namelen < sizeof(struct sockaddr))
return(-EINVAL);
if (msg->msg_namelen==sizeof(struct sockaddr_pkt))
- proto=saddr->spkt_protocol;
+ proto=htons(saddr->spkt_protocol);
}
else
return(-ENOTCONN); /* SOCK_PACKET must be sent giving an address */
I don't really know if my above changes are the "right" thing to do (in
particular the call to htons() when retrieving the spkt_protocol field).
Hopefully, Eric or someone else more knowledgable than I will look it over
and make a determination as to whether or not it should be sent on to
Linus.
> >>>>> "Eric" == Eric Schenk "Re: Diald doesn't work with 1.3.72 "
> >>>>> Wed, 13 Mar 1996 01:10:31 -0500
>
> Eric> Kevin Buettner <kev@primenet.com> writes:
> >>> These bugs together hose anyone who is using dynamic PPP or
> >>> SLIP, and anyone who sets things like "remote 127.0.0.3" in
> >>> their diald options. If you must have things working before I
> >>> can figure out the necessary fixes for the last bug, make sure
> >>> that you use the "reroute" option, and set your "remote"
> >>> address correctly!
> >> I can't set my "remote" address correctly because it is
> >> dynamic. OTOH, my local address is static. Should I still
> >> specify the dynamic option or not?
>
> Eric> You don't need it, but the remote address won't show up in
> Eric> your routing tables if you don't use it. For dynamic remote
> Eric> addresses this is mostly an esthetic choice.
>
> Eric> For the moment you must use the "reroute" option (which was
> Eric> broken in diald-0.12) with kernel versions 1.3.7[2-3]. This
> Eric> is fixed in 0.13, which I will try to release tomorrow. The
> Eric> need for the reroute option may go away if I can figure out
> Eric> why the 1.3.7[2-3] kernels don't allow SOCK_PACKET packets
> Eric> to be forwarded on ppp devices. I suspect this will be a
> Eric> kernel side patch though, so we'll probably have to wait for
> Eric> the patch to appear in the kernel sources (once one of us
> Eric> figures out what the patch should be!)
>