<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/netgraph/ng_bridge.c, branch release/6.2.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F6.2.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F6.2.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2007-01-11T22:54:46Z</updated>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2007-01-11T22:54:46Z</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2007-01-11T22:54:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=201f78d6b90635d961fa373ecd706e3786333b7e'/>
<id>urn:sha1:201f78d6b90635d961fa373ecd706e3786333b7e</id>
<content type='text'>
'RELENG_6_2_0_RELEASE'.

This commit was manufactured to restore the state of the 6.2-RELEASE image.
</content>
</entry>
<entry>
<title>In revision 1.29 timeout() was converted to ng_callout().</title>
<updated>2005-02-09T15:14:44Z</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2005-02-09T15:14:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=195cf61776bbf7ad1c739eca76d1de22fee37e15'/>
<id>urn:sha1:195cf61776bbf7ad1c739eca76d1de22fee37e15</id>
<content type='text'>
The difference is that the callout function installed via the
ng_callout() method is guaranteed to NOT fire after the shutdown
method was run (when a node is marked NGF_INVALID).  Also, the
shutdown method and the callout function are guaranteed to NOT
run at the same time, as both require the writer lock.  Thus
we can safely ignore a zero return value from ng_uncallout()
(callout_stop()) in shutdown methods, and go on with freeing
the node.

The said revision broke the node shutdown -- ng_bridge_timeout()
is no longer fired after ng_bridge_shutdown() was run, resulting
in a memory leak, dead nodes, and inability to unload the module.
Fix this by cancelling the callout on shutdown, and moving part
responsible for freeing a node resources from ng_bridge_timer()
to ng_bridge_shutdown().

Noticed by:	ru
Submitted by:	glebius, ru
</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>- Use ng_callout() instead of timeout.</title>
<updated>2004-12-14T08:05:29Z</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2004-12-14T08:05:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e0d32af754b629a6ba41a6c85b92ac0646788c26'/>
<id>urn:sha1:e0d32af754b629a6ba41a6c85b92ac0646788c26</id>
<content type='text'>
- Schedule next timeout *after* finishing job of the current one.
- Remove spl(9) calls.

Tested by:	ru
Reviewed by:	julian
</content>
</entry>
<entry>
<title>Convert ipfw to use PFIL_HOOKS.  This is change is transparent to userland</title>
<updated>2004-08-17T22:05:54Z</updated>
<author>
<name>Andre Oppermann</name>
<email>andre@FreeBSD.org</email>
</author>
<published>2004-08-17T22:05:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=9b932e9e048ade36fd50bad5eb8b9475b0a6082d'/>
<id>urn:sha1:9b932e9e048ade36fd50bad5eb8b9475b0a6082d</id>
<content type='text'>
and preserves the ipfw ABI.  The ipfw core packet inspection and filtering
functions have not been changed, only how ipfw is invoked is different.

However there are many changes how ipfw is and its add-on's are handled:

 In general ipfw is now called through the PFIL_HOOKS and most associated
 magic, that was in ip_input() or ip_output() previously, is now done in
 ipfw_check_[in|out]() in the ipfw PFIL handler.

 IPDIVERT is entirely handled within the ipfw PFIL handlers.  A packet to
 be diverted is checked if it is fragmented, if yes, ip_reass() gets in for
 reassembly.  If not, or all fragments arrived and the packet is complete,
 divert_packet is called directly.  For 'tee' no reassembly attempt is made
 and a copy of the packet is sent to the divert socket unmodified.  The
 original packet continues its way through ip_input/output().

 ipfw 'forward' is done via m_tag's.  The ipfw PFIL handlers tag the packet
 with the new destination sockaddr_in.  A check if the new destination is a
 local IP address is made and the m_flags are set appropriately.  ip_input()
 and ip_output() have some more work to do here.  For ip_input() the m_flags
 are checked and a packet for us is directly sent to the 'ours' section for
 further processing.  Destination changes on the input path are only tagged
 and the 'srcrt' flag to ip_forward() is set to disable destination checks
 and ICMP replies at this stage.  The tag is going to be handled on output.
 ip_output() again checks for m_flags and the 'ours' tag.  If found, the
 packet will be dropped back to the IP netisr where it is going to be picked
 up by ip_input() again and the directly sent to the 'ours' section.  When
 only the destination changes, the route's 'dst' is overwritten with the
 new destination from the forward m_tag.  Then it jumps back at the route
 lookup again and skips the firewall check because it has been marked with
 M_SKIP_FIREWALL.  ipfw 'forward' has to be compiled into the kernel with
 'option IPFIREWALL_FORWARD' to enable it.

 DUMMYNET is entirely handled within the ipfw PFIL handlers.  A packet for
 a dummynet pipe or queue is directly sent to dummynet_io().  Dummynet will
 then inject it back into ip_input/ip_output() after it has served its time.
 Dummynet packets are tagged and will continue from the next rule when they
 hit the ipfw PFIL handlers again after re-injection.

 BRIDGING and IPFW_ETHER are not changed yet and use ipfw_chk() directly as
 they did before.  Later this will be changed to dedicated ETHER PFIL_HOOKS.

More detailed changes to the code:

 conf/files
	Add netinet/ip_fw_pfil.c.

 conf/options
	Add IPFIREWALL_FORWARD option.

 modules/ipfw/Makefile
	Add ip_fw_pfil.c.

 net/bridge.c
	Disable PFIL_HOOKS if ipfw for bridging is active.  Bridging ipfw
	is still directly invoked to handle layer2 headers and packets would
	get a double ipfw when run through PFIL_HOOKS as well.

 netinet/ip_divert.c
	Removed divert_clone() function.  It is no longer used.

 netinet/ip_dummynet.[ch]
	Neither the route 'ro' nor the destination 'dst' need to be stored
	while in dummynet transit.  Structure members and associated macros
	are removed.

 netinet/ip_fastfwd.c
	Removed all direct ipfw handling code and replace it with the new
	'ipfw forward' handling code.

 netinet/ip_fw.h
	Removed 'ro' and 'dst' from struct ip_fw_args.

 netinet/ip_fw2.c
	(Re)moved some global variables and the module handling.

 netinet/ip_fw_pfil.c
	New file containing the ipfw PFIL handlers and module initialization.

 netinet/ip_input.c
	Removed all direct ipfw handling code and replace it with the new
	'ipfw forward' handling code.  ip_forward() does not longer require
	the 'next_hop' struct sockaddr_in argument.  Disable early checks
	if 'srcrt' is set.

 netinet/ip_output.c
	Removed all direct ipfw handling code and replace it with the new
	'ipfw forward' handling code.

 netinet/ip_var.h
	Add ip_reass() as general function.  (Used from ipfw PFIL handlers
	for IPDIVERT.)

 netinet/raw_ip.c
	Directly check if ipfw and dummynet control pointers are active.

 netinet/tcp_input.c
	Rework the 'ipfw forward' to local code to work with the new way of
	forward tags.

 netinet/tcp_sack.c
	Remove include 'opt_ipfw.h' which is not needed here.

 sys/mbuf.h
	Remove m_claim_next() macro which was exclusively for ipfw 'forward'
	and is no longer needed.

Approved by:	re (scottl)
</content>
</entry>
<entry>
<title>Slight cosmetic changes.</title>
<updated>2004-07-20T17:15:38Z</updated>
<author>
<name>Julian Elischer</name>
<email>julian@FreeBSD.org</email>
</author>
<published>2004-07-20T17:15:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=be4252b3678cb9f12ac9cbc4b9d827b06d073799'/>
<id>urn:sha1:be4252b3678cb9f12ac9cbc4b9d827b06d073799</id>
<content type='text'>
Also introduce a macro to be called by persistent nodes to signal their
persistence during shutdown to hide this mechanism from the node author.

Make node flags have a consistent style in naming.

Document the change.
</content>
</entry>
<entry>
<title>Having moved metadata usage to mbuf tags, remove code that supports</title>
<updated>2004-06-26T22:24:16Z</updated>
<author>
<name>Julian Elischer</name>
<email>julian@FreeBSD.org</email>
</author>
<published>2004-06-26T22:24:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=3ca24c284d7116d2764cd8bca4fa357a0bea07db'/>
<id>urn:sha1:3ca24c284d7116d2764cd8bca4fa357a0bea07db</id>
<content type='text'>
the old way of doing it.

Submitted by:	Gleb Smirnoff &lt;glebius@cell.sick.ru&gt;
</content>
</entry>
<entry>
<title>Fix a problem with multiple-delivery (i.e. broadcast) in ng_bridge.</title>
<updated>2004-06-22T18:56:47Z</updated>
<author>
<name>Brian Feldman</name>
<email>green@FreeBSD.org</email>
</author>
<published>2004-06-22T18:56:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=114bf09149f4a76f0fce941012bcf5e3942aaa80'/>
<id>urn:sha1:114bf09149f4a76f0fce941012bcf5e3942aaa80</id>
<content type='text'>
Only the first link0..link$NLINKS hooks would be utilized, whereas
the link hooks may be connected sparsely.

Add a counter variable so that the link hook array is only traversed
while there is still work to do, but that it continues up to the end
if it has to.
</content>
</entry>
<entry>
<title>Switch to using C99 sparse initialisers for the type methods array.</title>
<updated>2004-05-29T00:51:19Z</updated>
<author>
<name>Julian Elischer</name>
<email>julian@FreeBSD.org</email>
</author>
<published>2004-05-29T00:51:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=f8aae7776f85d2fa8aa93f73c37782cd9e1204c6'/>
<id>urn:sha1:f8aae7776f85d2fa8aa93f73c37782cd9e1204c6</id>
<content type='text'>
Should make no binary difference.

Submitted by:	Gleb Smirnoff &lt;glebius@cell.sick.ru&gt;
Reviewed by:	Harti Brandt &lt;harti@freebsd.org&gt;
MFC after:	1 week
</content>
</entry>
<entry>
<title>Get rid of the deprecated *LEN constants in favour of the new</title>
<updated>2004-01-26T14:05:31Z</updated>
<author>
<name>Hartmut Brandt</name>
<email>harti@FreeBSD.org</email>
</author>
<published>2004-01-26T14:05:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=87e2c66a6a23792e3598990f8f258ca7f52af928'/>
<id>urn:sha1:87e2c66a6a23792e3598990f8f258ca7f52af928</id>
<content type='text'>
*SIZ constants that include the trailing \0 byte.
</content>
</entry>
</feed>
