<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv4/ip_forward.c, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/ipv4/ip_forward.c?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/ipv4/ip_forward.c?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-10-08T21:42:36Z</updated>
<entry>
<title>ipv4: introduce rt_uses_gateway</title>
<updated>2012-10-08T21:42:36Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-10-08T11:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=155e8336c373d14d87a7f91e356d85ef4b93b8f9'/>
<id>urn:sha1:155e8336c373d14d87a7f91e356d85ef4b93b8f9</id>
<content type='text'>
Add new flag to remember when route is via gateway.
We will use it to allow rt_gateway to contain address of
directly connected host for the cases when DST_NOCACHE is
used or when the NH exception caches per-destination route
without DST_NOCACHE flag, i.e. when routes are not used for
other destinations. By this way we force the neighbour
resolving to work with the routed destination but we
can use different address in the packet, feature needed
for IPVS-DR where original packet for virtual IP is routed
via route to real IP.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: fix forwarding for strict source routes</title>
<updated>2012-10-08T21:42:35Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-10-08T11:41:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e0adef0f7456d5d3a3bfe8ea61c7dddf146b40e1'/>
<id>urn:sha1:e0adef0f7456d5d3a3bfe8ea61c7dddf146b40e1</id>
<content type='text'>
After the change "Adjust semantics of rt-&gt;rt_gateway"
(commit f8126f1d51) rt_gateway can be 0 but ip_forward() compares
it directly with nexthop. What we want here is to check if traffic
is to directly connected nexthop and to fail if using gateway.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>snmp: fix OutOctets counter to include forwarded datagrams</title>
<updated>2012-06-07T21:50:56Z</updated>
<author>
<name>Vincent Bernat</name>
<email>bernat@luffy.cx</email>
</author>
<published>2012-06-05T03:41:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2d8dbb04c63e5369988f008bc4df3359c01d8812'/>
<id>urn:sha1:2d8dbb04c63e5369988f008bc4df3359c01d8812</id>
<content type='text'>
RFC 4293 defines ipIfStatsOutOctets (similar definition for
ipSystemStatsOutOctets):

   The total number of octets in IP datagrams delivered to the lower
   layers for transmission.  Octets from datagrams counted in
   ipIfStatsOutTransmits MUST be counted here.

And ipIfStatsOutTransmits:

   The total number of IP datagrams that this entity supplied to the
   lower layers for transmission.  This includes datagrams generated
   locally and those forwarded by this entity.

Therefore, IPSTATS_MIB_OUTOCTETS must be incremented when incrementing
IPSTATS_MIB_OUTFORWDATAGRAMS.

IP_UPD_PO_STATS is not used since ipIfStatsOutRequests must not
include forwarded datagrams:

   The total number of IP datagrams that local IP user-protocols
   (including ICMP) supplied to IP in requests for transmission.  Note
   that this counter does not include any datagrams counted in
   ipIfStatsOutForwDatagrams.

Signed-off-by: Vincent Bernat &lt;bernat@luffy.cx&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: fix checkpatch errors</title>
<updated>2012-04-15T16:37:19Z</updated>
<author>
<name>Daniel Baluta</name>
<email>dbaluta@ixiacom.com</email>
</author>
<published>2012-04-15T01:34:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5e73ea1a31c3612aa6dfe44f864ca5b7b6a4cff9'/>
<id>urn:sha1:5e73ea1a31c3612aa6dfe44f864ca5b7b6a4cff9</id>
<content type='text'>
Fix checkpatch errors of the following type:
	* ERROR: "foo * bar" should be "foo *bar"
	* ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Daniel Baluta &lt;dbaluta@ixiacom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Save nexthop address of LSRR/SSRR option to IPCB.</title>
<updated>2011-11-24T00:19:32Z</updated>
<author>
<name>Li Wei</name>
<email>lw@cn.fujitsu.com</email>
</author>
<published>2011-11-22T23:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ac8a48106be49c422575ddc7531b776f8eb49610'/>
<id>urn:sha1:ac8a48106be49c422575ddc7531b776f8eb49610</id>
<content type='text'>
We can not update iph-&gt;daddr in ip_options_rcv_srr(), It is too early.
When some exception ocurred later (eg. in ip_forward() when goto
sr_failed) we need the ip header be identical to the original one as
ICMP need it.

Add a field 'nexthop' in struct ip_options to save nexthop of LSRR
or SSRR option.

Signed-off-by: Li Wei &lt;lw@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Fix 'iph' use before set.</title>
<updated>2011-05-13T03:03:46Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-05-13T03:03:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=72a8f97bf2dfe1b0f02ba8dbaed7d6b76657aae3'/>
<id>urn:sha1:72a8f97bf2dfe1b0f02ba8dbaed7d6b76657aae3</id>
<content type='text'>
I swear none of my compilers warned about this, yet it is so
obvious.

&gt; net/ipv4/ip_forward.c: In function 'ip_forward':
&gt; net/ipv4/ip_forward.c:87: warning: 'iph' may be used uninitialized in this function

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Elide use of rt-&gt;rt_dst in ip_forward()</title>
<updated>2011-05-12T23:34:30Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-05-12T23:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=def57687e9579b7a797681990dff763c411f5347'/>
<id>urn:sha1:def57687e9579b7a797681990dff763c411f5347</id>
<content type='text'>
No matter what kind of header mangling occurs due to IP options
processing, rt-&gt;rt_dst will always equal iph-&gt;daddr in the packet.

So we can safely use iph-&gt;daddr instead of rt-&gt;rt_dst here.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net-next: remove useless union keyword</title>
<updated>2010-06-11T06:31:35Z</updated>
<author>
<name>Changli Gao</name>
<email>xiaosuo@gmail.com</email>
</author>
<published>2010-06-11T06:31:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d8d1f30b95a635dbd610dcc5eb641aca8f4768cf'/>
<id>urn:sha1:d8d1f30b95a635dbd610dcc5eb641aca8f4768cf</id>
<content type='text'>
remove useless union keyword in rtable, rt6_info and dn_route.

Since there is only one member in a union, the union keyword isn't useful.

Signed-off-by: Changli Gao &lt;xiaosuo@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of /repos/git/net-next-2.6</title>
<updated>2010-04-20T14:02:01Z</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2010-04-20T14:02:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=62910554656cdcd6b6f84a5154c4155aae4ca231'/>
<id>urn:sha1:62910554656cdcd6b6f84a5154c4155aae4ca231</id>
<content type='text'>
Conflicts:
	Documentation/feature-removal-schedule.txt
	net/ipv6/netfilter/ip6t_REJECT.c
	net/netfilter/xt_limit.c

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
</feed>
