Subject: Re: tcp/ip diffs

From: [email-masked]
Date: Tue, 4 Aug 92 18:49:17 PDT

X-Mn-Key: NET
> 
> [email-masked]: "tcp/ip diffs" (Aug  4, 16:44):
> > Here are diffs against .97 (+ profile patches) that are required for
> > all the tcp/ip code.  It includes 4 files, one for vhangup, one for
> > the tty's, one for fcntl, and one for the net directory.  I would
> > appretiate it if you would include all these diffs in the next
> > release.
> 
> Your next message indicated there were problems with the patch, so I
> won't put it in yet. Other than that, I think I'm ready for the tcp/ip
> code.
	Some diffs to fix the problem are at the end of the message.
For the net/tcp directory, you should probably get it from nic.funet.fi
Linux/testing/beta/NET, as it's very big.
> 
> One thing I've been wondering about: does the tcp/ip code use 386bsd
> code heavily? I've had a few people asking about it, as they don't like
> the USL suit against BSDI. I'd rather be NET/2 free (which the current
> kernel should be), although I personally think the USL suit will fail
> (but it may take some time)
> 
	All the clients and servers are from BIND.  The only kernel
code that is remotely related to anything is the wd8003 driver.  I used
the 386bsd driver as an example when I wrote the code.  But basically
everything is different.  The basic tcp/ip code was written completely
by me.  The only thing I've gotten from anyone else is some icmp code
which is probably not from net2, as it has to interface with everything
I did which is not remotely like anything in net2 (Actually I don't know
this since I haven't look at the net2 code, but the way the tcp/ip code
evolved it couldn't be like anything else.)

Everyone Please note at the end of this message are some diffs which must
be applied for unix domain sockets to work (after applying my sock.diff
which screws them up.)  

[Ari, Please add them to the ftp site either in the tar file or next to it.]

Ross Biro [email-masked] 
Member League for Programming Freedom (LPF)
mail [email-masked] for information

ps. I'm using X right now, so the diffs work.
---- important diffs ----- 
*** ../linux/net/unix.c	Tue Aug  4 12:26:38 1992
--- linux/net/unix.c	Tue Aug  4 17:30:29 1992
***************
*** 431,441 ****
  {
     struct socket *clientsock;

  	PRINTK("unix_proto_accept: socket 0x%x accepted via socket 0x%x\n",
  	       sock, newsock);
- 	unix_data_ref(UN_DATA(newsock->conn));

  	/*
  	 * if there aren't any sockets awaiting connection, then wait for
  	 * one, unless nonblocking
  	 */
--- 431,440 ----
***************
*** 446,456 ****
  		if (current->signal & ~current->blocked) {
  			PRINTK("sys_accept: sleep was interrupted\n");
  			return -ERESTARTSYS;
  		}
  	}
- 	UN_DATA(newsock)->peerupd = UN_DATA(newsock->conn);

  	/*
  	 * great. finish the connection relative to server and client,
  	 * wake up the client and return the new fd to the server
  	 */
--- 445,454 ----
***************
*** 459,468 ****
--- 457,470 ----
  	newsock->conn = clientsock;
  	clientsock->conn = newsock;
  	clientsock->state = SS_CONNECTED;
  	newsock->state = SS_CONNECTED;
  	wake_up(clientsock->wait);
+
+         unix_data_ref (UN_DATA(newsock->conn));
+ 	UN_DATA(newsock)->peerupd = UN_DATA(newsock->conn);
+
  	return 0;
  }

  /*
   * gets the current name or the name of the connected socket.