<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/sys/net/raw_usrreq.c, branch stable/7</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=stable%2F7</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=stable%2F7'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2011-10-04T13:19:21Z</updated>
<entry>
<title>MFC r225837:</title>
<updated>2011-10-04T13:19:21Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2011-10-04T13:19:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=de655c07dfcf1f13c358ff8f80dc7fdd0f4e65c1'/>
<id>urn:sha1:de655c07dfcf1f13c358ff8f80dc7fdd0f4e65c1</id>
<content type='text'>
 Pass the fibnum where we need filtering of the message on the
 rtsock allowing routing daemons to filter routing updates on an
 rtsock per FIB.

 Adjust raw_input() and split it into wrapper and a new function
 taking an optional callback argument even though we only have one
 consumer [1] to keep the hackish flags local to rtsock.c.

 PR:            kern/134931
 Submitted by:  multiple (see PR)
 Suggested by:  rwatson [1]
 Reviewed by:   rwatson
</content>
</entry>
<entry>
<title>Merge r180385 from head to stable/7:</title>
<updated>2008-08-31T15:55:59Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2008-08-31T15:55:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=6f53ede329ca1af899846bb15dc7e83f8062c70a'/>
<id>urn:sha1:6f53ede329ca1af899846bb15dc7e83f8062c70a</id>
<content type='text'>
  Remove unused support for local and foreign addresses in generic raw
  socket support.  These utility routines are used only for routing and
  pfkey sockets, neither of which have a notion of address, so were
  required to mock up fake socket addresses to avoid connection
  requirements for applications that did not specify their own fake
  addresses (most of them).

  Quite a bit of the removed code is #ifdef notdef, since raw sockets
  don't support bind() or connect() in practice.  Removing this
  simplifies the raw socket implementation, and removes two (commented
  out) uses of dtom(9).

  Fake addresses passed to sendto(2) by applications are ignored for
  compatibility reasons, but this is now done in a more consistent way
  (and with a comment).  Possibly, EINVAL could be returned here in
  the future if it is determined that no applications depend on the
  semantic inconsistency of specifying a destination address for a
  protocol without address support, but this will require some amount
  of careful surveying.

  NB: This does not affect netinet, netinet6, or other wire protocol
  raw sockets, which provide their own independent infrastructure with
  control block address support specific to the protocol.

  Reviewed by:    bz
</content>
</entry>
<entry>
<title>Merge r180305 from head to stable/7:</title>
<updated>2008-08-31T15:39:06Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2008-08-31T15:39:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=f687a9aae7e31e38b2763ad335d2c3f188cf8b8f'/>
<id>urn:sha1:f687a9aae7e31e38b2763ad335d2c3f188cf8b8f</id>
<content type='text'>
  Improve approximation of style(9) in raw socket code.
</content>
</entry>
<entry>
<title>Sweep kernel replacing suser(9) calls with priv(9) calls, assigning</title>
<updated>2006-11-06T13:42:10Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-11-06T13:42:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=acd3428b7d3e94cef0e1881c868cb4b131d4ff41'/>
<id>urn:sha1:acd3428b7d3e94cef0e1881c868cb4b131d4ff41</id>
<content type='text'>
specific privilege names to a broad range of privileges.  These may
require some future tweaking.

Sponsored by:           nCircle Network Security, Inc.
Obtained from:          TrustedBSD Project
Discussed on:           arch@
Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri,
                        Alex Lyashkov &lt;umka at sevcity dot net&gt;,
                        Skip Ford &lt;skip dot ford at verizon dot net&gt;,
                        Antoine Brodin &lt;antoine dot brodin at laposte dot net&gt;
</content>
</entry>
<entry>
<title>Change semantics of socket close and detach.  Add a new protocol switch</title>
<updated>2006-07-21T17:11:15Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-07-21T17:11:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=a152f8a36128ce99cc252941396d7db06ec7084e'/>
<id>urn:sha1:a152f8a36128ce99cc252941396d7db06ec7084e</id>
<content type='text'>
function, pru_close, to notify protocols that the file descriptor or
other consumer of a socket is closing the socket.  pru_abort is now a
notification of close also, and no longer detaches.  pru_detach is no
longer used to notify of close, and will be called during socket
tear-down by sofree() when all references to a socket evaporate after
an earlier call to abort or close the socket.  This means detach is now
an unconditional teardown of a socket, whereas previously sockets could
persist after detach of the protocol retained a reference.

This faciliates sharing mutexes between layers of the network stack as
the mutex is required during the checking and removal of references at
the head of sofree().  With this change, pru_detach can now assume that
the mutex will no longer be required by the socket layer after
completion, whereas before this was not necessarily true.

Reviewed by:	gnn
</content>
</entry>
<entry>
<title>raw_disconnect() now disconnects but does not detach the raw pcb.  As a</title>
<updated>2006-06-02T08:27:15Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-06-02T08:27:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=4421f50dbcd2f36b743aa399d2b97522e01adfa2'/>
<id>urn:sha1:4421f50dbcd2f36b743aa399d2b97522e01adfa2</id>
<content type='text'>
result, raw_uabort() now needs to call raw_detach() directly.  As
raw_uabort() is never called, and raw_disconnect() is probably not ever
actually called in practice, this is likely not a functional change, but
improves congruence between protocols, and avoids a NULL raw cb pointer
after disconnect, which could result in a panic.

MFC after:	1 month
</content>
</entry>
<entry>
<title>Correct an assertion in raw_uattach(): this is a library call that other</title>
<updated>2006-04-09T15:15:28Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-04-09T15:15:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=9d209514793cccf2aed8b1b08c8c404d6d9840be'/>
<id>urn:sha1:9d209514793cccf2aed8b1b08c8c404d6d9840be</id>
<content type='text'>
protocols invoke after allocating a PCB, so so_pcb should be non-NULL.
It is only used by the two IPSEC implementations, so I didn't hit it in
my testing.

Reported by:	pjd
MFC after:	3 months
</content>
</entry>
<entry>
<title>In raw and raw-derived socket types, maintain and enforce invariant that</title>
<updated>2006-04-01T15:55:44Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-04-01T15:55:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=0154484bef027a2d9ac7575e85ca4347b34c72e8'/>
<id>urn:sha1:0154484bef027a2d9ac7575e85ca4347b34c72e8</id>
<content type='text'>
the so_pcb pointer on the socket is always non-NULL.  This eliminates
countless unnecessary error checks, replacing them with assertions.

MFC after:	3 months
</content>
</entry>
<entry>
<title>Chance protocol switch method pru_detach() so that it returns void</title>
<updated>2006-04-01T15:42:02Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-04-01T15:42:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=bc725eafc7f7d0cb3d3746b71b3cad9b2bc9d499'/>
<id>urn:sha1:bc725eafc7f7d0cb3d3746b71b3cad9b2bc9d499</id>
<content type='text'>
rather than an error.  Detaches do not "fail", they other occur or
the protocol flags SS_PROTOREF to take ownership of the socket.

soclose() no longer looks at so_pcb to see if it's NULL, relying
entirely on the protocol to decide whether it's time to free the
socket or not using SS_PROTOREF.  so_pcb is now entirely owned and
managed by the protocol code.  Likewise, no longer test so_pcb in
other socket functions, such as soreceive(), which have no business
digging into protocol internals.

Protocol detach routines no longer try to free the socket on detach,
this is performed in the socket code if the protocol permits it.

In rts_detach(), no longer test for rp != NULL in detach, and
likewise in other protocols that don't permit a NULL so_pcb, reduce
the incidence of testing for it during detach.

netinet and netinet6 are not fully updated to this change, which
will be in an upcoming commit.  In their current state they may leak
memory or panic.

MFC after:	3 months
</content>
</entry>
<entry>
<title>Change protocol switch pru_abort() API so that it returns void rather</title>
<updated>2006-04-01T15:15:05Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-04-01T15:15:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=ac45e92ff2195eb1addc4debd946c83ac6baa356'/>
<id>urn:sha1:ac45e92ff2195eb1addc4debd946c83ac6baa356</id>
<content type='text'>
than an int, as an error here is not meaningful.  Modify soabort() to
unconditionally free the socket on the return of pru_abort(), and
modify most protocols to no longer conditionally free the socket,
since the caller will do this.

This commit likely leaves parts of netinet and netinet6 in a situation
where they may panic or leak memory, as they have not are not fully
updated by this commit.  This will be corrected shortly in followup
commits to these components.

MFC after:      3 months
</content>
</entry>
</feed>
