<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/usr.sbin/ppp/bundle.c, branch release/4.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F4.0.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F4.0.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2000-03-20T08:47:53Z</updated>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2000-03-20T08:47:53Z</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2000-03-20T08:47:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=7e6cd705f344de2f9f08475a0fa2ef9191f88dd0'/>
<id>urn:sha1:7e6cd705f344de2f9f08475a0fa2ef9191f88dd0</id>
<content type='text'>
'RELENG_4_0_0_RELEASE'.

This commit was manufactured to restore the state of the 4.0-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
</content>
</entry>
<entry>
<title>Handle the availability of TUNSIFHEAD.  If it's there, use it.</title>
<updated>2000-01-23T01:48:19Z</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>2000-01-23T01:48:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=3a7b6d76a72ffdc941a7cdfe6e0ef61e01ee33ea'/>
<id>urn:sha1:3a7b6d76a72ffdc941a7cdfe6e0ef61e01ee33ea</id>
<content type='text'>
For the moment this is just overhead, but it'll be used for INET6
support later.
</content>
</entry>
<entry>
<title>Use TUNSIFPID when we change our PID (if it exists).</title>
<updated>2000-01-21T00:33:27Z</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>2000-01-21T00:33:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=06b47306d13051320c360f68f8729ac8b6ec0754'/>
<id>urn:sha1:06b47306d13051320c360f68f8729ac8b6ec0754</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Correct usages of getuid() and geteuid()</title>
<updated>1999-12-30T03:36:11Z</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>1999-12-30T03:36:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=a19a5c023dc8470b49a6b7728b34e8801fe5a671'/>
<id>urn:sha1:a19a5c023dc8470b49a6b7728b34e8801fe5a671</id>
<content type='text'>
Pointed out by: billf
</content>
</entry>
<entry>
<title>Add a bunch of `const's and fix a typo.</title>
<updated>1999-12-27T11:54:57Z</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>1999-12-27T11:54:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=182c898a22f7c1d2ff8a1cf8e123e079ea549e80'/>
<id>urn:sha1:182c898a22f7c1d2ff8a1cf8e123e079ea549e80</id>
<content type='text'>
Submitted by: Rich Neswold &lt;rneswold@MCS.Net&gt;
</content>
</entry>
<entry>
<title>Don't bother fork()ing after closing a ctty if ppp is about to</title>
<updated>1999-12-23T21:43:25Z</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>1999-12-23T21:43:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e62ce959d08c7468e4261773593a08443a6b5d58'/>
<id>urn:sha1:e62ce959d08c7468e4261773593a08443a6b5d58</id>
<content type='text'>
terminate anyway.
</content>
</entry>
<entry>
<title>Cosmetic: Make struct mbuf more like kernel mbufs.</title>
<updated>1999-12-20T20:29:47Z</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>1999-12-20T20:29:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=26af0ae96638b0453bcc87cae6031eb0b3988171'/>
<id>urn:sha1:26af0ae96638b0453bcc87cae6031eb0b3988171</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change the way we transfer links (again).  The previous</title>
<updated>1999-11-30T23:52:37Z</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>1999-11-30T23:52:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=cbee975442bcd8259dfadbad6b9bee33be07112a'/>
<id>urn:sha1:cbee975442bcd8259dfadbad6b9bee33be07112a</id>
<content type='text'>
method avoided all race conditions, but suffered from
sometimes running out of buffer space if enough clients
were piled up at the same time.

Now, the client pushes the link descriptor, one end of a
socketpair() and the ppp version via sendmsg() at the
server.  The server replies with a pid.  The client then
transfers any link lock with uu_lock_txfr() and writev()s
the actual link contents.  The socketpair is now the only
place we need to have large socket buffers and the bind()ed
socket can keep the default 4k buffer while still handling
around 90 racing clients.
</content>
</entry>
<entry>
<title>Make -foreground a proper option (allowing ``allow mode foreground'',</title>
<updated>1999-11-28T15:50:08Z</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>1999-11-28T15:50:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=f6a4e748a9f923ed25549deb30abd57129c35439'/>
<id>urn:sha1:f6a4e748a9f923ed25549deb30abd57129c35439</id>
<content type='text'>
``set mode foreground'' etc.
</content>
</entry>
<entry>
<title>Rewrite the link descriptor transfer code in MP mode.</title>
<updated>1999-11-25T02:47:04Z</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>1999-11-25T02:47:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=2cb305af778acccc5b3ee351e99990c31781efc2'/>
<id>urn:sha1:2cb305af778acccc5b3ee351e99990c31781efc2</id>
<content type='text'>
Previously, ppp attempted to bind() to a local domain tcp socket
based on the peer authname &amp; enddisc.  If it succeeded, it listen()ed
and became MP server.  If it failed, it connect()ed and became MP
client.  The server then select()ed on the descriptor, accept()ed
it and wrote its pid to it then read the link data &amp; link file descriptor,
and finally sent an ack (``!'').  The client would read() the server
pid, transfer the link lock to that pid, send the link data &amp; descriptor
and read the ack.  It would then close the descriptor and clean up.

There was a race between the bind() and listen() where someone could
attempt to connect() and fail.

This change removes the race.  Now ppp makes the RCVBUF big enough on a
socket descriptor and attempts to bind() to a local domain *udp* socket
(same name as before).  If it succeeds, it becomes MP server.  If it
fails, it sets the SNDBUF and connect()s, becoming MP client.  The server
select()s on the descriptor and recvmsg()s the message, insisting on at
least two descriptors (plus the link data).  It uses the second descriptor
to write() its pid then read()s an ack (``!'').  The client creates a
socketpair() and sendmsg()s the link data, link descriptor and one of
the socketpair descriptors.  It then read()s the server pid from the
other socketpair descriptor, transfers any locks and write()s an ack.

Now, there can be no race, and a connect() failure indicates a stale
socket file.

This also fixes MP ppp over ethernet, where the struct msghdr was being
misconstructed when transferring the control socket descriptor.

Also, if we fail to send the link, don't hang around in a ``session
owner'' state, just do the setsid() and fork() if it's required to
disown a tty.

UDP idea suggested by: Chris Bennet from Mindspring at FreeBSDCon
</content>
</entry>
</feed>
