<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: RE: long standing problem with cipe finally resolved...
From: "Jan De landtsheer" <Jan.delandtsheer,AT,dct-mail,DOT,com>
Date: Sun, 18 Nov 2001 20:28:45 +0100

But what about PKCIPE then ?
I _really_ would like to use this tool ;o)

Thx
Jan

> -----Original Message-----
> From: Olaf Titz [mailto:olaf,AT,bigred,DOT,inka,DOT,de 
> Sent: Sunday, November 18, 2001 7:23 PM
> To: cipe-l,AT,inka,DOT,de
> Subject: Re: long standing problem with cipe finally resolved...
> 
> 
> > > So basically, I'm not sure if a bind() is supposed to 
> last through a 
> > > connect(AF_UNSPEC). But, basically, it doesn't, at least on this 
> > > box/kernel. The server is running 2.2.19 btw. Clients running 
> > > 2.4.10.
> 
> Good question what it is supposed to. The local and remote 
> addresses are different things and bind() and connect() 
> _should_ not interact, but that's IMHO. Also note that the 
> code for connect() has changed dramatically over the kernel versions.
> 
> > > Anyway, by commenting out the "dis"connect() code in 
> opendev(), and 
> > > just letting cipe continue to do another connect() on the socket 
> > > (i.e. instead of conn/disconn/conn, just let it do conn/conn), it 
> > > has started
> > > working fine for me.
> 
> When I coded the stuff I had a rather unusual system, where 
> both incoming pkcipe and outgoing cipe would go via different 
> proxies and most automatic address-picking would fail. This 
> was the reason for the -r argument and socket passing. (So 
> much for the background and why this all is so weird. :-)
> 
> I think the reason for the disconnection is that the kernel 
> would not allow connect() on an already connected socket. If 
> it does, fine, then the code can just be removed, I think.
> 
> Just looking over the kernel code:
> 2.0.38 seems to allow re-connect
> 2.2.19 seems to allow re-connect, also has code for explicit
>        disconnection which does _not_ touch the local port but _does_
>        touch the local address
> 2.4.9 seems to allow re-connect, its disconnect code does _not_ touch
>       the local address.
> 
> Looking at this, it seems that the disconnection code can be 
> removed. Unfortunately, I'm not in my original 
> weird-config-stress-test network any more to see if something 
> would break. PKCIPE users, please test.
> 
> Olaf
> 
> --- cipe/ciped.c        2001/04/15 21:25:12     1.52
> +++ cipe/ciped.c        2001/11/18 18:13:14
> @@ -300,6 +300,8 @@
>      if (inetd) {
>          f=0;
>      } else if (usesock>=0) {
> +#if 0
> +        /* this seems to be unnecessary */
>         struct sockaddr_in sa;
>         memset(&sa, 0, sizeof(sa));
>         sa.sin_family=AF_UNSPEC;
> @@ -307,6 +309,7 @@
>         if (connect(f, (struct sockaddr *)&sa, sizeof(sa))<0) {
>             err("opendev: disconnect: %m");
>         }
> +#endif
>      } else {
>          if ((f=socket(AF_INET, SOCK_DGRAM, 0))<0) {
>              Log(LOG_ERR, "opendev: socket: %m");
> 
> === end of patch ===
> 
> 
> --
> Message sent by the cipe-l,AT,inka,DOT,de mailing list.
> Unsubscribe: mail majordomo,AT,inka,DOT,de, "unsubscribe cipe-l" in 
> body Other commands available with "help" in body to the same 
> address. CIPE info and list archive: 
> <URL:http://sites.inka.de/~bigred/devel/cipe.html>
> 





<< | Thread Index | >> ]    [ << | Date Index | >> ]