<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/netinet/ip_gre.c, branch release/7.2.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F7.2.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F7.2.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2009-05-01T02:51:58Z</updated>
<entry>
<title>Copy releng/7.2 to release/7.2.0 for FreeBSD 7.2-RELEASE.</title>
<updated>2009-05-01T02:51:58Z</updated>
<author>
<name>Ken Smith</name>
<email>kensmith@FreeBSD.org</email>
</author>
<published>2009-05-01T02:51:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b205d83df7763ca1f099bce5ac12a05862a626c4'/>
<id>urn:sha1:b205d83df7763ca1f099bce5ac12a05862a626c4</id>
<content type='text'>
Approved by:	re (implicit)

This commit was manufactured to restore the state of the 7.2-RELEASE image.
</content>
</entry>
<entry>
<title>Add FBSDID to all files in netinet so that people can more</title>
<updated>2007-10-07T20:44:24Z</updated>
<author>
<name>Mike Silbersack</name>
<email>silby@FreeBSD.org</email>
</author>
<published>2007-10-07T20:44:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4b421e2daaa3e23db6b5a51f8ca5b2da0d894a56'/>
<id>urn:sha1:4b421e2daaa3e23db6b5a51f8ca5b2da0d894a56</id>
<content type='text'>
easily include file version information in bug reports.

Approved by:	re (kensmith)
</content>
</entry>
<entry>
<title>Fix the following bpf(4) race condition which can result in a panic:</title>
<updated>2006-06-02T19:59:33Z</updated>
<author>
<name>Christian S.J. Peron</name>
<email>csjp@FreeBSD.org</email>
</author>
<published>2006-06-02T19:59:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=16d878cc99efc07781a49b1db1a33ed09018d139'/>
<id>urn:sha1:16d878cc99efc07781a49b1db1a33ed09018d139</id>
<content type='text'>
	(1) bpf peer attaches to interface netif0
	(2) Packet is received by netif0
	(3) ifp-&gt;if_bpf pointer is checked and handed off to bpf
	(4) bpf peer detaches from netif0 resulting in ifp-&gt;if_bpf being
	    initialized to NULL.
	(5) ifp-&gt;if_bpf is dereferenced by bpf machinery
	(6) Kaboom

This race condition likely explains the various different kernel panics
reported around sending SIGINT to tcpdump or dhclient processes. But really
this race can result in kernel panics anywhere you have frequent bpf attach
and detach operations with high packet per second load.

Summary of changes:

- Remove the bpf interface's "driverp" member
- When we attach bpf interfaces, we now set the ifp-&gt;if_bpf member to the
  bpf interface structure. Once this is done, ifp-&gt;if_bpf should never be
  NULL. [1]
- Introduce bpf_peers_present function, an inline operation which will do
  a lockless read bpf peer list associated with the interface. It should
  be noted that the bpf code will pickup the bpf_interface lock before adding
  or removing bpf peers. This should serialize the access to the bpf descriptor
  list, removing the race.
- Expose the bpf_if structure in bpf.h so that the bpf_peers_present function
  can use it. This also removes the struct bpf_if; hack that was there.
- Adjust all consumers of the raw if_bpf structure to use bpf_peers_present

Now what happens is:

	(1) Packet is received by netif0
	(2) Check to see if bpf descriptor list is empty
	(3) Pickup the bpf interface lock
	(4) Hand packet off to process

From the attach/detach side:

	(1) Pickup the bpf interface lock
	(2) Add/remove from bpf descriptor list

Now that we are storing the bpf interface structure with the ifnet, there is
is no need to walk the bpf interface list to locate the correct bpf interface.
We now simply look up the interface, and initialize the pointer. This has a
nice side effect of changing a bpf interface attach operation from O(N) (where
N is the number of bpf interfaces), to O(1).

[1] From now on, we can no longer check ifp-&gt;if_bpf to tell us whether or
    not we have any bpf peers that might be interested in receiving packets.

In collaboration with:	sam@
MFC after:	1 month
</content>
</entry>
<entry>
<title>Since m_pullup() can return a new mbuf, change gre_input2() to</title>
<updated>2006-05-16T11:15:22Z</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2006-05-16T11:15:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e5f88c4492881aa91286b895dd811d92ad728a5f'/>
<id>urn:sha1:e5f88c4492881aa91286b895dd811d92ad728a5f</id>
<content type='text'>
return mbuf back to gre_input(). If the former returns mbuf back
to the latter, then pass it to raw_input().

Coverity ID:	829
</content>
</entry>
<entry>
<title>Convert last remaining function in ip_gre.c to ANSI C function</title>
<updated>2006-01-22T01:08:30Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-01-22T01:08:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=d0c75d36b97c4d3c14ea1344d33478b41cad80b7'/>
<id>urn:sha1:d0c75d36b97c4d3c14ea1344d33478b41cad80b7</id>
<content type='text'>
declaration.

MFC after:	1 week
</content>
</entry>
<entry>
<title>Fix stack corruptions on amd64.</title>
<updated>2006-01-21T10:44:34Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2006-01-21T10:44:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=3f2e28fe9ffbb70d26e5cc7abba248e981434853'/>
<id>urn:sha1:3f2e28fe9ffbb70d26e5cc7abba248e981434853</id>
<content type='text'>
Vararg functions have a different calling convention than regular
functions on amd64. Casting a varag function to a regular one to
match the function pointer declaration will hide the varargs from
the caller and we will end up with an incorrectly setup stack.

Entirely remove the varargs from these functions and change the
functions to match the declaration of the function pointers.
Remove the now unnecessary casts.

Lots of explanations and help from:     peter
Reviewed by:                            peter
PR:                                     amd64/89261
MFC after:                              6 days
</content>
</entry>
<entry>
<title>Add support for IPv6 over GRE [1]. PR kern/80340 includes the</title>
<updated>2005-08-01T08:14:21Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2005-08-01T08:14:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=9e669156d49d639980264c8c064e9f95a4105cb6'/>
<id>urn:sha1:9e669156d49d639980264c8c064e9f95a4105cb6</id>
<content type='text'>
  FreeBSD specific ip_newid() changes NetBSD does not have.
Correct handling of non AF_INET packets passed to bpf [2].

PR:		kern/80340[1], NetBSD PRs 29150[1], 30844[2]
Obtained from:	NetBSD ip_gre.c rev. 1.34,1.35, if_gre.c rev. 1.56
Submitted by:	Gert Doering &lt;gert at greenie.muc.de&gt;[2]
MFC after:	4 days
</content>
</entry>
<entry>
<title>Stop embedding struct ifnet at the top of driver softcs. Instead the</title>
<updated>2005-06-10T16:49:24Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2005-06-10T16:49:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=fc74a9f93a5fbc83262aa12084404ac953c854b5'/>
<id>urn:sha1:fc74a9f93a5fbc83262aa12084404ac953c854b5</id>
<content type='text'>
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.

This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.

Other changes of note:
 - Struct arpcom is no longer referenced in normal interface code.
   Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
   To enforce this ac_enaddr has been renamed to _ac_enaddr.
 - The second argument to ether_ifattach is now always the mac address
   from driver private storage rather than sometimes being ac_enaddr.

Reviewed by:	sobomax, sam
</content>
</entry>
<entry>
<title>/* -&gt; /*- for license, minor formatting changes</title>
<updated>2005-01-07T01:45:51Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2005-01-07T01:45:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=c398230b64aea809cb7c5cea8db580af7097920c'/>
<id>urn:sha1:c398230b64aea809cb7c5cea8db580af7097920c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>White space cleanup for netinet before branch:</title>
<updated>2004-08-16T18:32:07Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2004-08-16T18:32:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=a4f757cd5dc1421d90d72a34853247e0c2c18cce'/>
<id>urn:sha1:a4f757cd5dc1421d90d72a34853247e0c2c18cce</id>
<content type='text'>
- Trailing tab/space cleanup
- Remove spurious spaces between or before tabs

This change avoids touching files that Andre likely has in his working
set for PFIL hooks changes for IPFW/DUMMYNET.

Approved by:	re (scottl)
Submitted by:	Xin LI &lt;delphij@frontfree.net&gt;
</content>
</entry>
</feed>
