<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/ipv6/icmp.c, branch v3.9</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ipv6: Add an error handler for icmp6</title>
<updated>2013-01-18T19:19:42+00:00</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2013-01-16T22:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6f809da27c94425e07be4a64d5093e1df95188e9'/>
<id>6f809da27c94425e07be4a64d5093e1df95188e9</id>
<content type='text'>
pmtu and redirect events are now handled in the protocols error handler,
so add an error handler for icmp6 to do this. It is needed in the case
when we have no socket context. Based on a patch by Duan Jiong.

Reported-by: Duan Jiong &lt;djduanjiong@gmail.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pmtu and redirect events are now handled in the protocols error handler,
so add an error handler for icmp6 to do this. It is needed in the case
when we have no socket context. Based on a patch by Duan Jiong.

Reported-by: Duan Jiong &lt;djduanjiong@gmail.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Enable some sysctls that are safe for the userns root</title>
<updated>2012-11-19T01:33:00+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-11-16T03:03:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c027aab4a6b1fe2541090ac04bee8ad246aeef70'/>
<id>c027aab4a6b1fe2541090ac04bee8ad246aeef70</id>
<content type='text'>
- Enable the per device ipv4 sysctls:
   net/ipv4/conf/&lt;if&gt;/forwarding
   net/ipv4/conf/&lt;if&gt;/mc_forwarding
   net/ipv4/conf/&lt;if&gt;/accept_redirects
   net/ipv4/conf/&lt;if&gt;/secure_redirects
   net/ipv4/conf/&lt;if&gt;/shared_media
   net/ipv4/conf/&lt;if&gt;/rp_filter
   net/ipv4/conf/&lt;if&gt;/send_redirects
   net/ipv4/conf/&lt;if&gt;/accept_source_route
   net/ipv4/conf/&lt;if&gt;/accept_local
   net/ipv4/conf/&lt;if&gt;/src_valid_mark
   net/ipv4/conf/&lt;if&gt;/proxy_arp
   net/ipv4/conf/&lt;if&gt;/medium_id
   net/ipv4/conf/&lt;if&gt;/bootp_relay
   net/ipv4/conf/&lt;if&gt;/log_martians
   net/ipv4/conf/&lt;if&gt;/tag
   net/ipv4/conf/&lt;if&gt;/arp_filter
   net/ipv4/conf/&lt;if&gt;/arp_announce
   net/ipv4/conf/&lt;if&gt;/arp_ignore
   net/ipv4/conf/&lt;if&gt;/arp_accept
   net/ipv4/conf/&lt;if&gt;/arp_notify
   net/ipv4/conf/&lt;if&gt;/proxy_arp_pvlan
   net/ipv4/conf/&lt;if&gt;/disable_xfrm
   net/ipv4/conf/&lt;if&gt;/disable_policy
   net/ipv4/conf/&lt;if&gt;/force_igmp_version
   net/ipv4/conf/&lt;if&gt;/promote_secondaries
   net/ipv4/conf/&lt;if&gt;/route_localnet

- Enable the global ipv4 sysctl:
   net/ipv4/ip_forward

- Enable the per device ipv6 sysctls:
   net/ipv6/conf/&lt;if&gt;/forwarding
   net/ipv6/conf/&lt;if&gt;/hop_limit
   net/ipv6/conf/&lt;if&gt;/mtu
   net/ipv6/conf/&lt;if&gt;/accept_ra
   net/ipv6/conf/&lt;if&gt;/accept_redirects
   net/ipv6/conf/&lt;if&gt;/autoconf
   net/ipv6/conf/&lt;if&gt;/dad_transmits
   net/ipv6/conf/&lt;if&gt;/router_solicitations
   net/ipv6/conf/&lt;if&gt;/router_solicitation_interval
   net/ipv6/conf/&lt;if&gt;/router_solicitation_delay
   net/ipv6/conf/&lt;if&gt;/force_mld_version
   net/ipv6/conf/&lt;if&gt;/use_tempaddr
   net/ipv6/conf/&lt;if&gt;/temp_valid_lft
   net/ipv6/conf/&lt;if&gt;/temp_prefered_lft
   net/ipv6/conf/&lt;if&gt;/regen_max_retry
   net/ipv6/conf/&lt;if&gt;/max_desync_factor
   net/ipv6/conf/&lt;if&gt;/max_addresses
   net/ipv6/conf/&lt;if&gt;/accept_ra_defrtr
   net/ipv6/conf/&lt;if&gt;/accept_ra_pinfo
   net/ipv6/conf/&lt;if&gt;/accept_ra_rtr_pref
   net/ipv6/conf/&lt;if&gt;/router_probe_interval
   net/ipv6/conf/&lt;if&gt;/accept_ra_rt_info_max_plen
   net/ipv6/conf/&lt;if&gt;/proxy_ndp
   net/ipv6/conf/&lt;if&gt;/accept_source_route
   net/ipv6/conf/&lt;if&gt;/optimistic_dad
   net/ipv6/conf/&lt;if&gt;/mc_forwarding
   net/ipv6/conf/&lt;if&gt;/disable_ipv6
   net/ipv6/conf/&lt;if&gt;/accept_dad
   net/ipv6/conf/&lt;if&gt;/force_tllao

- Enable the global ipv6 sysctls:
   net/ipv6/bindv6only
   net/ipv6/icmp/ratelimit

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Enable the per device ipv4 sysctls:
   net/ipv4/conf/&lt;if&gt;/forwarding
   net/ipv4/conf/&lt;if&gt;/mc_forwarding
   net/ipv4/conf/&lt;if&gt;/accept_redirects
   net/ipv4/conf/&lt;if&gt;/secure_redirects
   net/ipv4/conf/&lt;if&gt;/shared_media
   net/ipv4/conf/&lt;if&gt;/rp_filter
   net/ipv4/conf/&lt;if&gt;/send_redirects
   net/ipv4/conf/&lt;if&gt;/accept_source_route
   net/ipv4/conf/&lt;if&gt;/accept_local
   net/ipv4/conf/&lt;if&gt;/src_valid_mark
   net/ipv4/conf/&lt;if&gt;/proxy_arp
   net/ipv4/conf/&lt;if&gt;/medium_id
   net/ipv4/conf/&lt;if&gt;/bootp_relay
   net/ipv4/conf/&lt;if&gt;/log_martians
   net/ipv4/conf/&lt;if&gt;/tag
   net/ipv4/conf/&lt;if&gt;/arp_filter
   net/ipv4/conf/&lt;if&gt;/arp_announce
   net/ipv4/conf/&lt;if&gt;/arp_ignore
   net/ipv4/conf/&lt;if&gt;/arp_accept
   net/ipv4/conf/&lt;if&gt;/arp_notify
   net/ipv4/conf/&lt;if&gt;/proxy_arp_pvlan
   net/ipv4/conf/&lt;if&gt;/disable_xfrm
   net/ipv4/conf/&lt;if&gt;/disable_policy
   net/ipv4/conf/&lt;if&gt;/force_igmp_version
   net/ipv4/conf/&lt;if&gt;/promote_secondaries
   net/ipv4/conf/&lt;if&gt;/route_localnet

- Enable the global ipv4 sysctl:
   net/ipv4/ip_forward

- Enable the per device ipv6 sysctls:
   net/ipv6/conf/&lt;if&gt;/forwarding
   net/ipv6/conf/&lt;if&gt;/hop_limit
   net/ipv6/conf/&lt;if&gt;/mtu
   net/ipv6/conf/&lt;if&gt;/accept_ra
   net/ipv6/conf/&lt;if&gt;/accept_redirects
   net/ipv6/conf/&lt;if&gt;/autoconf
   net/ipv6/conf/&lt;if&gt;/dad_transmits
   net/ipv6/conf/&lt;if&gt;/router_solicitations
   net/ipv6/conf/&lt;if&gt;/router_solicitation_interval
   net/ipv6/conf/&lt;if&gt;/router_solicitation_delay
   net/ipv6/conf/&lt;if&gt;/force_mld_version
   net/ipv6/conf/&lt;if&gt;/use_tempaddr
   net/ipv6/conf/&lt;if&gt;/temp_valid_lft
   net/ipv6/conf/&lt;if&gt;/temp_prefered_lft
   net/ipv6/conf/&lt;if&gt;/regen_max_retry
   net/ipv6/conf/&lt;if&gt;/max_desync_factor
   net/ipv6/conf/&lt;if&gt;/max_addresses
   net/ipv6/conf/&lt;if&gt;/accept_ra_defrtr
   net/ipv6/conf/&lt;if&gt;/accept_ra_pinfo
   net/ipv6/conf/&lt;if&gt;/accept_ra_rtr_pref
   net/ipv6/conf/&lt;if&gt;/router_probe_interval
   net/ipv6/conf/&lt;if&gt;/accept_ra_rt_info_max_plen
   net/ipv6/conf/&lt;if&gt;/proxy_ndp
   net/ipv6/conf/&lt;if&gt;/accept_source_route
   net/ipv6/conf/&lt;if&gt;/optimistic_dad
   net/ipv6/conf/&lt;if&gt;/mc_forwarding
   net/ipv6/conf/&lt;if&gt;/disable_ipv6
   net/ipv6/conf/&lt;if&gt;/accept_dad
   net/ipv6/conf/&lt;if&gt;/force_tllao

- Enable the global ipv6 sysctls:
   net/ipv6/bindv6only
   net/ipv6/icmp/ratelimit

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Don't export sysctls to unprivileged users</title>
<updated>2012-11-19T01:30:55+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-11-16T03:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=464dc801c76aa0db88e16e8f5f47c6879858b9b2'/>
<id>464dc801c76aa0db88e16e8f5f47c6879858b9b2</id>
<content type='text'>
In preparation for supporting the creation of network namespaces
by unprivileged users, modify all of the per net sysctl exports
and refuse to allow them to unprivileged users.

This makes it safe for unprivileged users in general to access
per net sysctls, and allows sysctls to be exported to unprivileged
users on an individual basis as they are deemed safe.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation for supporting the creation of network namespaces
by unprivileged users, modify all of the per net sysctl exports
and refuse to allow them to unprivileged users.

This makes it safe for unprivileged users in general to access
per net sysctls, and allows sysctls to be exported to unprivileged
users on an individual basis as they are deemed safe.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: use IS_ENABLED()</title>
<updated>2012-11-01T16:41:35+00:00</updated>
<author>
<name>Amerigo Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2012-10-29T16:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=07a936260a94ae4798527ce8f79d4f3b589ab8a3'/>
<id>07a936260a94ae4798527ce8f79d4f3b589ab8a3</id>
<content type='text'>
#if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE)

can be replaced by

#if IS_ENABLED(CONFIG_FOO)

Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
#if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE)

can be replaced by

#if IS_ENABLED(CONFIG_FOO)

Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: Use icmpv6_notify() to propagate redirect, instead of rt6_redirect().</title>
<updated>2012-07-12T07:33:37+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-07-12T07:33:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b94f1c0904da9b8bf031667afc48080ba7c3e8c9'/>
<id>b94f1c0904da9b8bf031667afc48080ba7c3e8c9</id>
<content type='text'>
And delete rt6_redirect(), since it is no longer used.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And delete rt6_redirect(), since it is no longer used.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: Minimize use of cached route inetpeer.</title>
<updated>2012-07-11T05:40:11+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-07-10T10:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1d861aa4b3fb08822055345f480850205ffe6170'/>
<id>1d861aa4b3fb08822055345f480850205ffe6170</id>
<content type='text'>
Only use it in the absolutely required cases:

1) COW'ing metrics

2) ipv4 PMTU

3) ipv4 redirects

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only use it in the absolutely required cases:

1) COW'ing metrics

2) ipv4 PMTU

3) ipv4 redirects

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: Sanitize inet{,6} protocol demux.</title>
<updated>2012-06-20T01:56:21+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-06-20T01:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f9242b6b28d61295f2bf7e8adfb1060b382e5381'/>
<id>f9242b6b28d61295f2bf7e8adfb1060b382e5381</id>
<content type='text'>
Don't pretend that inet_protos[] and inet6_protos[] are hashes, thay
are just a straight arrays.  Remove all unnecessary hash masking.

Document MAX_INET_PROTOS.

Use RAW_HTABLE_SIZE when appropriate.

Reported-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't pretend that inet_protos[] and inet6_protos[] are hashes, thay
are just a straight arrays.  Remove all unnecessary hash masking.

Document MAX_INET_PROTOS.

Use RAW_HTABLE_SIZE when appropriate.

Reported-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: Handle PMTU in ICMP error handlers.</title>
<updated>2012-06-15T21:54:11+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-06-15T21:54:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=81aded24675ebda5de8a68843250ad15584ac38a'/>
<id>81aded24675ebda5de8a68843250ad15584ac38a</id>
<content type='text'>
One tricky issue on the ipv6 side vs. ipv4 is that the ICMP callouts
to handle the error pass the 32-bit info cookie in network byte order
whereas ipv4 passes it around in host byte order.

Like the ipv4 side, we have two helper functions.  One for when we
have a socket context and one for when we do not.

ip6ip6 tunnels are not handled here, because they handle PMTU events
by essentially relaying another ICMP packet-too-big message back to
the original sender.

This patch allows us to get rid of rt6_do_pmtu_disc().  It handles all
kinds of situations that simply cannot happen when we do the PMTU
update directly using a fully resolved route.

In fact, the "plen == 128" check in ip6_rt_update_pmtu() can very
likely be removed or changed into a BUG_ON() check.  We should never
have a prefixed ipv6 route when we get there.

Another piece of strange history here is that TCP and DCCP, unlike in
ipv4, never invoke the update_pmtu() method from their ICMP error
handlers.  This is incredibly astonishing since this is the context
where we have the most accurate context in which to make a PMTU
update, namely we have a fully connected socket and associated cached
socket route.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One tricky issue on the ipv6 side vs. ipv4 is that the ICMP callouts
to handle the error pass the 32-bit info cookie in network byte order
whereas ipv4 passes it around in host byte order.

Like the ipv4 side, we have two helper functions.  One for when we
have a socket context and one for when we do not.

ip6ip6 tunnels are not handled here, because they handle PMTU events
by essentially relaying another ICMP packet-too-big message back to
the original sender.

This patch allows us to get rid of rt6_do_pmtu_disc().  It handles all
kinds of situations that simply cannot happen when we do the PMTU
update directly using a fully resolved route.

In fact, the "plen == 128" check in ip6_rt_update_pmtu() can very
likely be removed or changed into a BUG_ON() check.  We should never
have a prefixed ipv6 route when we get there.

Another piece of strange history here is that TCP and DCCP, unlike in
ipv4, never invoke the update_pmtu() method from their ICMP error
handlers.  This is incredibly astonishing since this is the context
where we have the most accurate context in which to make a PMTU
update, namely we have a fully connected socket and associated cached
socket route.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: Create and use rt{,6}_get_peer_create().</title>
<updated>2012-06-09T06:24:18+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-06-09T06:24:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fbfe95a42e90b3dd079cc9019ba7d7700feee0f6'/>
<id>fbfe95a42e90b3dd079cc9019ba7d7700feee0f6</id>
<content type='text'>
There's a lot of places that open-code rt{,6}_get_peer() only because
they want to set 'create' to one.  So add an rt{,6}_get_peer_create()
for their sake.

There were also a few spots open-coding plain rt{,6}_get_peer() and
those are transformed here as well.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's a lot of places that open-code rt{,6}_get_peer() only because
they want to set 'create' to one.  So add an rt{,6}_get_peer_create()
for their sake.

There were also a few spots open-coding plain rt{,6}_get_peer() and
those are transformed here as well.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: bool/const conversions phase2</title>
<updated>2012-05-19T05:08:16+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-05-18T18:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a50feda546ac03415707a9bbcac8d6b20714db21'/>
<id>a50feda546ac03415707a9bbcac8d6b20714db21</id>
<content type='text'>
Mostly bool conversions, some inline removals and const additions.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mostly bool conversions, some inline removals and const additions.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
