<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv6, branch v3.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-03-28T20:54:50Z</updated>
<entry>
<title>ipv6: move DAD and addrconf_verify processing to workqueue</title>
<updated>2014-03-28T20:54:50Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2014-03-27T17:28:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c15b1ccadb323ea50023e8f1cca2954129a62b51'/>
<id>urn:sha1:c15b1ccadb323ea50023e8f1cca2954129a62b51</id>
<content type='text'>
addrconf_join_solict and addrconf_join_anycast may cause actions which
need rtnl locked, especially on first address creation.

A new DAD state is introduced which defers processing of the initial
DAD processing into a workqueue.

To get rtnl lock we need to push the code paths which depend on those
calls up to workqueues, specifically addrconf_verify and the DAD
processing.

(v2)
addrconf_dad_failure needs to be queued up to the workqueue, too. This
patch introduces a new DAD state and stop the DAD processing in the
workqueue (this is because of the possible ipv6_del_addr processing
which removes the solicited multicast address from the device).

addrconf_verify_lock is removed, too. After the transition it is not
needed any more.

As we are not processing in bottom half anymore we need to be a bit more
careful about disabling bottom half out when we lock spin_locks which are also
used in bh.

Relevant backtrace:
[  541.030090] RTNL: assertion failed at net/core/dev.c (4496)
[  541.031143] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O 3.10.33-1-amd64-vyatta #1
[  541.031145] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
[  541.031146]  ffffffff8148a9f0 000000000000002f ffffffff813c98c1 ffff88007c4451f8
[  541.031148]  0000000000000000 0000000000000000 ffffffff813d3540 ffff88007fc03d18
[  541.031150]  0000880000000006 ffff88007c445000 ffffffffa0194160 0000000000000000
[  541.031152] Call Trace:
[  541.031153]  &lt;IRQ&gt;  [&lt;ffffffff8148a9f0&gt;] ? dump_stack+0xd/0x17
[  541.031180]  [&lt;ffffffff813c98c1&gt;] ? __dev_set_promiscuity+0x101/0x180
[  541.031183]  [&lt;ffffffff813d3540&gt;] ? __hw_addr_create_ex+0x60/0xc0
[  541.031185]  [&lt;ffffffff813cfe1a&gt;] ? __dev_set_rx_mode+0xaa/0xc0
[  541.031189]  [&lt;ffffffff813d3a81&gt;] ? __dev_mc_add+0x61/0x90
[  541.031198]  [&lt;ffffffffa01dcf9c&gt;] ? igmp6_group_added+0xfc/0x1a0 [ipv6]
[  541.031208]  [&lt;ffffffff8111237b&gt;] ? kmem_cache_alloc+0xcb/0xd0
[  541.031212]  [&lt;ffffffffa01ddcd7&gt;] ? ipv6_dev_mc_inc+0x267/0x300 [ipv6]
[  541.031216]  [&lt;ffffffffa01c2fae&gt;] ? addrconf_join_solict+0x2e/0x40 [ipv6]
[  541.031219]  [&lt;ffffffffa01ba2e9&gt;] ? ipv6_dev_ac_inc+0x159/0x1f0 [ipv6]
[  541.031223]  [&lt;ffffffffa01c0772&gt;] ? addrconf_join_anycast+0x92/0xa0 [ipv6]
[  541.031226]  [&lt;ffffffffa01c311e&gt;] ? __ipv6_ifa_notify+0x11e/0x1e0 [ipv6]
[  541.031229]  [&lt;ffffffffa01c3213&gt;] ? ipv6_ifa_notify+0x33/0x50 [ipv6]
[  541.031233]  [&lt;ffffffffa01c36c8&gt;] ? addrconf_dad_completed+0x28/0x100 [ipv6]
[  541.031241]  [&lt;ffffffff81075c1d&gt;] ? task_cputime+0x2d/0x50
[  541.031244]  [&lt;ffffffffa01c38d6&gt;] ? addrconf_dad_timer+0x136/0x150 [ipv6]
[  541.031247]  [&lt;ffffffffa01c37a0&gt;] ? addrconf_dad_completed+0x100/0x100 [ipv6]
[  541.031255]  [&lt;ffffffff8105313a&gt;] ? call_timer_fn.isra.22+0x2a/0x90
[  541.031258]  [&lt;ffffffffa01c37a0&gt;] ? addrconf_dad_completed+0x100/0x100 [ipv6]

Hunks and backtrace stolen from a patch by Stephen Hemminger.

Reported-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ip6mr: fix mfc notification flags</title>
<updated>2014-03-20T20:24:28Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2014-03-19T16:47:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f518338b16038beeb73e155e60d0f70beb9379f4'/>
<id>urn:sha1:f518338b16038beeb73e155e60d0f70beb9379f4</id>
<content type='text'>
Commit 812e44dd1829 ("ip6mr: advertise new mfc entries via rtnl") reuses the
function ip6mr_fill_mroute() to notify mfc events.
But this function was used only for dump and thus was always setting the
flag NLM_F_MULTI, which is wrong in case of a single notification.

Libraries like libnl will wait forever for NLMSG_DONE.

CC: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: ip6_append_data_mtu do not handle the mtu of the second fragment properly</title>
<updated>2014-03-18T19:17:53Z</updated>
<author>
<name>lucien</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2014-03-17T04:51:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e367c2d03dba4c9bcafad24688fadb79dd95b218'/>
<id>urn:sha1:e367c2d03dba4c9bcafad24688fadb79dd95b218</id>
<content type='text'>
In ip6_append_data_mtu(), when the xfrm mode is not tunnel(such as
transport),the ipsec header need to be added in the first fragment, so the mtu
will decrease to reserve space for it, then the second fragment come, the mtu
should be turn back, as the commit 0c1833797a5a6ec23ea9261d979aa18078720b74
said.  however, in the commit a493e60ac4bbe2e977e7129d6d8cbb0dd236be, it use
*mtu = min(*mtu, ...) to change the mtu, which lead to the new mtu is alway
equal with the first fragment's. and cannot turn back.

when I test through  ping6 -c1 -s5000 $ip (mtu=1280):
...frag (0|1232) ESP(spi=0x00002000,seq=0xb), length 1232
...frag (1232|1216)
...frag (2448|1216)
...frag (3664|1216)
...frag (4880|164)

which should be:
...frag (0|1232) ESP(spi=0x00001000,seq=0x1), length 1232
...frag (1232|1232)
...frag (2464|1232)
...frag (3696|1232)
...frag (4928|116)

so delete the min() when change back the mtu.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Fixes: 75a493e60ac4bb ("ipv6: ip6_append_data_mtu did not care about pmtudisc and frag_size")
Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Avoid unnecessary temporary addresses being generated</title>
<updated>2014-03-13T19:49:14Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>heiner.kallweit@web.de</email>
</author>
<published>2014-03-12T21:13:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ecab67015ef6e3f3635551dcc9971cf363cc1cd5'/>
<id>urn:sha1:ecab67015ef6e3f3635551dcc9971cf363cc1cd5</id>
<content type='text'>
tmp_prefered_lft is an offset to ifp-&gt;tstamp, not now. Therefore
age needs to be added to the condition.

Age calculation in ipv6_create_tempaddr is different from the one
in addrconf_verify and doesn't consider ADDRCONF_TIMER_FUZZ_MINUS.
This can cause age in ipv6_create_tempaddr to be less than the one
in addrconf_verify and therefore unnecessary temporary address to
be generated.
Use age calculation as in addrconf_modify to avoid this.

Signed-off-by: Heiner Kallweit &lt;heiner.kallweit@web.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: don't set DST_NOCOUNT for remotely added routes</title>
<updated>2014-03-06T22:29:27Z</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2014-03-06T16:51:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c88507fbad8055297c1d1e21e599f46960cbee39'/>
<id>urn:sha1:c88507fbad8055297c1d1e21e599f46960cbee39</id>
<content type='text'>
DST_NOCOUNT should only be used if an authorized user adds routes
locally. In case of routes which are added on behalf of router
advertisments this flag must not get used as it allows an unlimited
number of routes getting added remotely.

Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Fix exthdrs offload registration.</title>
<updated>2014-03-06T21:35:55Z</updated>
<author>
<name>Anton Nayshtut</name>
<email>anton@swortex.com</email>
</author>
<published>2014-03-05T06:30:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d2d273ffabd315eecefce21a4391d44b6e156b73'/>
<id>urn:sha1:d2d273ffabd315eecefce21a4391d44b6e156b73</id>
<content type='text'>
Without this fix, ipv6_exthdrs_offload_init doesn't register IPPROTO_DSTOPTS
offload, but returns 0 (as the IPPROTO_ROUTING registration actually succeeds).

This then causes the ipv6_gso_segment to drop IPv6 packets with IPPROTO_DSTOPTS
header.

The issue detected and the fix verified by running MS HCK Offload LSO test on
top of QEMU Windows guests, as this test sends IPv6 packets with
IPPROTO_DSTOPTS.

Signed-off-by: Anton Nayshtut &lt;anton@swortex.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: ipv6_find_hdr restore prev functionality</title>
<updated>2014-02-27T23:27:26Z</updated>
<author>
<name>Hans Schillstrom</name>
<email>hans@schillstrom.com</email>
</author>
<published>2014-02-27T11:57:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=accfe0e356327da5bd53da8852b93fc22de9b5fc'/>
<id>urn:sha1:accfe0e356327da5bd53da8852b93fc22de9b5fc</id>
<content type='text'>
The commit 9195bb8e381d81d5a315f911904cdf0cfcc919b8 ("ipv6: improve
ipv6_find_hdr() to skip empty routing headers") broke ipv6_find_hdr().

When a target is specified like IPPROTO_ICMPV6 ipv6_find_hdr()
returns -ENOENT when it's found, not the header as expected.

A part of IPVS is broken and possible also nft_exthdr_eval().
When target is -1 which it is most cases, it works.

This patch exits the do while loop if the specific header is found
so the nexthdr could be returned as expected.

Reported-by: Art -kwaak- van Breemen &lt;ard@telegraafnet.nl&gt;
Signed-off-by: Hans Schillstrom &lt;hans@schillstrom.com&gt;
CC:Ansis Atteka &lt;aatteka@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec</title>
<updated>2014-02-27T21:19:41Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2014-02-27T21:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23187212e7c3664f6a0d8ccd83b6d32c05aeafcb'/>
<id>urn:sha1:23187212e7c3664f6a0d8ccd83b6d32c05aeafcb</id>
<content type='text'>
Steffen Klassert says:

====================
1) Build fix for ip_vti when NET_IP_TUNNEL is not set.
   We need this set to have ip_tunnel_get_stats64()
   available.

2) Fix a NULL pointer dereference on sub policy usage.
   We try to access a xfrm_state from the wrong array.

3) Take xfrm_state_lock in xfrm_migrate_state_find(),
   we need it to traverse through the state lists.

4) Clone states properly on migration, otherwise we crash
   when we migrate a state with aead algorithm attached.

5) Fix unlink race when between thread context and timer
   when policies are deleted.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ipv6: ping: Use socket mark in routing lookup</title>
<updated>2014-02-27T21:08:46Z</updated>
<author>
<name>Lorenzo Colitti</name>
<email>lorenzo@google.com</email>
</author>
<published>2014-02-27T04:38:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf439b3154ce49d81a79b14f9fab18af99018ae2'/>
<id>urn:sha1:bf439b3154ce49d81a79b14f9fab18af99018ae2</id>
<content type='text'>
Signed-off-by: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: ipv6: better estimate tunnel header cut for correct ufo handling</title>
<updated>2014-02-25T23:27:06Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2014-02-23T23:48:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=91a48a2e85a3b70ce10ead34b4ab5347f8d215c9'/>
<id>urn:sha1:91a48a2e85a3b70ce10ead34b4ab5347f8d215c9</id>
<content type='text'>
Currently the UFO fragmentation process does not correctly handle inner
UDP frames.

(The following tcpdumps are captured on the parent interface with ufo
disabled while tunnel has ufo enabled, 2000 bytes payload, mtu 1280,
both sit device):

IPv6:
16:39:10.031613 IP (tos 0x0, ttl 64, id 3208, offset 0, flags [DF], proto IPv6 (41), length 1300)
    192.168.122.151 &gt; 1.1.1.1: IP6 (hlim 64, next-header Fragment (44) payload length: 1240) 2001::1 &gt; 2001::8: frag (0x00000001:0|1232) 44883 &gt; distinct: UDP, length 2000
16:39:10.031709 IP (tos 0x0, ttl 64, id 3209, offset 0, flags [DF], proto IPv6 (41), length 844)
    192.168.122.151 &gt; 1.1.1.1: IP6 (hlim 64, next-header Fragment (44) payload length: 784) 2001::1 &gt; 2001::8: frag (0x00000001:0|776) 58979 &gt; 46366: UDP, length 5471

We can see that fragmentation header offset is not correctly updated.
(fragmentation id handling is corrected by 916e4cf46d0204 ("ipv6: reuse
ip6_frag_id from ip6_ufo_append_data")).

IPv4:
16:39:57.737761 IP (tos 0x0, ttl 64, id 3209, offset 0, flags [DF], proto IPIP (4), length 1296)
    192.168.122.151 &gt; 1.1.1.1: IP (tos 0x0, ttl 64, id 57034, offset 0, flags [none], proto UDP (17), length 1276)
    192.168.99.1.35961 &gt; 192.168.99.2.distinct: UDP, length 2000
16:39:57.738028 IP (tos 0x0, ttl 64, id 3210, offset 0, flags [DF], proto IPIP (4), length 792)
    192.168.122.151 &gt; 1.1.1.1: IP (tos 0x0, ttl 64, id 57035, offset 0, flags [none], proto UDP (17), length 772)
    192.168.99.1.13531 &gt; 192.168.99.2.20653: UDP, length 51109

In this case fragmentation id is incremented and offset is not updated.

First, I aligned inet_gso_segment and ipv6_gso_segment:
* align naming of flags
* ipv6_gso_segment: setting skb-&gt;encapsulation is unnecessary, as we
  always ensure that the state of this flag is left untouched when
  returning from upper gso segmenation function
* ipv6_gso_segment: move skb_reset_inner_headers below updating the
  fragmentation header data, we don't care for updating fragmentation
  header data
* remove currently unneeded comment indicating skb-&gt;encapsulation might
  get changed by upper gso_segment callback (gre and udp-tunnel reset
  encapsulation after segmentation on each fragment)

If we encounter an IPIP or SIT gso skb we now check for the protocol ==
IPPROTO_UDP and that we at least have already traversed another ip(6)
protocol header.

The reason why we have to special case GSO_IPIP and GSO_SIT is that
we reset skb-&gt;encapsulation to 0 while skb_mac_gso_segment the inner
protocol of GSO_UDP_TUNNEL or GSO_GRE packets.

Reported-by: Wolfgang Walter &lt;linux@stwm.de&gt;
Cc: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Cc: Tom Herbert &lt;therbert@google.com&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
