<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/net/ipv4/icmp.c, branch dev-4.6</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-03-01T22:18:44+00:00</updated>
<entry>
<title>net: ipv4: Convert IP network timestamps to be y2038 safe</title>
<updated>2016-03-01T22:18:44+00:00</updated>
<author>
<name>Deepa Dinamani</name>
<email>deepa.kernel@gmail.com</email>
</author>
<published>2016-02-27T08:32:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=822c868532cae2cc1c51f4f18ab61c194d98aaf6'/>
<id>urn:sha1:822c868532cae2cc1c51f4f18ab61c194d98aaf6</id>
<content type='text'>
ICMP timestamp messages and IP source route options require
timestamps to be in milliseconds modulo 24 hours from
midnight UT format.

Add inet_current_timestamp() function to support this. The function
returns the required timestamp in network byte order.

Timestamp calculation is also changed to call ktime_get_real_ts64()
which uses struct timespec64. struct timespec64 is y2038 safe.
Previously it called getnstimeofday() which uses struct timespec.
struct timespec is not y2038 safe.

Signed-off-by: Deepa Dinamani &lt;deepa.kernel@gmail.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Alexey Kuznetsov &lt;kuznet@ms2.inr.ac.ru&gt;
Cc: Hideaki YOSHIFUJI &lt;yoshfuji@linux-ipv6.org&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Acked-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "ipv4/icmp: redirect messages can use the ingress daddr as source"</title>
<updated>2015-10-14T13:01:07+00:00</updated>
<author>
<name>Paolo Abeni</name>
<email>pabeni@redhat.com</email>
</author>
<published>2015-10-14T12:25:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=02a6d6136fa2a17f400a030829a6435556b3e65b'/>
<id>urn:sha1:02a6d6136fa2a17f400a030829a6435556b3e65b</id>
<content type='text'>
Revert the commit e2ca690b657f ("ipv4/icmp: redirect messages
can use the ingress daddr as source"), which tried to introduce a more
suitable behaviour for ICMP redirect messages generated by VRRP routers.
However RFC 5798 section 8.1.1 states:

    The IPv4 source address of an ICMP redirect should be the address
    that the end-host used when making its next-hop routing decision.

while said commit used the generating packet destination
address, which do not match the above and in most cases leads to
no redirect packets to be generated.

Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4/icmp: redirect messages can use the ingress daddr as source</title>
<updated>2015-10-13T02:38:02+00:00</updated>
<author>
<name>Paolo Abeni</name>
<email>pabeni@redhat.com</email>
</author>
<published>2015-10-09T12:34:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=e2ca690b657f4ca5c204fcc6470d462b776d73b3'/>
<id>urn:sha1:e2ca690b657f4ca5c204fcc6470d462b776d73b3</id>
<content type='text'>
This patch allows configuring how the source address of ICMP
redirect messages is selected; by default the old behaviour is
retained, while setting icmp_redirects_use_orig_daddr force the
usage of the destination address of the packet that caused the
redirect.

The new behaviour fits closely the RFC 5798 section 8.1.1, and fix the
following scenario:

Two machines are set up with VRRP to act as routers out of a subnet,
they have IPs x.x.x.1/24 and x.x.x.2/24, with VRRP holding on to
x.x.x.254/24.

If a host in said subnet needs to get an ICMP redirect from the VRRP
router, i.e. to reach a destination behind a different gateway, the
source IP in the ICMP redirect is chosen as the primary IP on the
interface that the packet arrived at, i.e. x.x.x.1 or x.x.x.2.

The host will then ignore said redirect, due to RFC 1122 section 3.2.2.2,
and will continue to use the wrong next-op.

Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: ICMP packet inspection for multipath</title>
<updated>2015-10-05T10:00:04+00:00</updated>
<author>
<name>Peter Nørlund</name>
<email>pch@ordbogen.com</email>
</author>
<published>2015-09-30T08:12:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=79a131592dbb81a2dba208622a2ffbfc53f28bc0'/>
<id>urn:sha1:79a131592dbb81a2dba208622a2ffbfc53f28bc0</id>
<content type='text'>
ICMP packets are inspected to let them route together with the flow they
belong to, minimizing the chance that a problematic path will affect flows
on other paths, and so that anycast environments can work with ECMP.

Signed-off-by: Peter Nørlund &lt;pch@ordbogen.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Replace vrf_master_ifindex{, _rcu} with l3mdev equivalents</title>
<updated>2015-09-30T03:40:33+00:00</updated>
<author>
<name>David Ahern</name>
<email>dsa@cumulusnetworks.com</email>
</author>
<published>2015-09-30T03:07:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=385add906b6155e8bc64035ad56fb8ccfef925f7'/>
<id>urn:sha1:385add906b6155e8bc64035ad56fb8ccfef925f7</id>
<content type='text'>
Replace calls to vrf_master_ifindex_rcu and vrf_master_ifindex with either
l3mdev_master_ifindex_rcu or l3mdev_master_ifindex.

The pattern:
    oif = vrf_master_ifindex(dev) ? : dev-&gt;ifindex;
is replaced with
    oif = l3mdev_fib_oif(dev);

And remove the now unused vrf macros.

Signed-off-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Fix panic in icmp_route_lookup</title>
<updated>2015-09-26T04:44:02+00:00</updated>
<author>
<name>David Ahern</name>
<email>dsa@cumulusnetworks.com</email>
</author>
<published>2015-09-24T21:31:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=bdb06cbf77cb01911694cc9076ffa8196b7b9b61'/>
<id>urn:sha1:bdb06cbf77cb01911694cc9076ffa8196b7b9b61</id>
<content type='text'>
Andrey reported a panic:

[ 7249.865507] BUG: unable to handle kernel pointer dereference at 000000b4
[ 7249.865559] IP: [&lt;c16afeca&gt;] icmp_route_lookup+0xaa/0x320
[ 7249.865598] *pdpt = 0000000030f7f001 *pde = 0000000000000000
[ 7249.865637] Oops: 0000 [#1]
...
[ 7249.866811] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.3.0-999-generic #201509220155
[ 7249.866876] Hardware name: MSI MS-7250/MS-7250, BIOS 080014  08/02/2006
[ 7249.866916] task: c1a5ab00 ti: c1a52000 task.ti: c1a52000
[ 7249.866949] EIP: 0060:[&lt;c16afeca&gt;] EFLAGS: 00210246 CPU: 0
[ 7249.866981] EIP is at icmp_route_lookup+0xaa/0x320
[ 7249.867012] EAX: 00000000 EBX: f483ba48 ECX: 00000000 EDX: f2e18a00
[ 7249.867045] ESI: 000000c0 EDI: f483ba70 EBP: f483b9ec ESP: f483b974
[ 7249.867077]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 7249.867108] CR0: 8005003b CR2: 000000b4 CR3: 36ee07c0 CR4: 000006f0
[ 7249.867141] Stack:
[ 7249.867165]  320310ee 00000000 00000042 320310ee 00000000 c1aeca00
f3920240 f0c69180
[ 7249.867268]  f483ba04 f855058b a89b66cd f483ba44 f8962f4b 00000000
e659266c f483ba54
[ 7249.867361]  8004753c f483ba5c f8962f4b f2031140 000003c1 ffbd8fa0
c16b0e00 00000064
[ 7249.867448] Call Trace:
[ 7249.867494]  [&lt;f855058b&gt;] ? e1000_xmit_frame+0x87b/0xdc0 [e1000e]
[ 7249.867534]  [&lt;f8962f4b&gt;] ? tcp_in_window+0xeb/0xb10 [nf_conntrack]
[ 7249.867576]  [&lt;f8962f4b&gt;] ? tcp_in_window+0xeb/0xb10 [nf_conntrack]
[ 7249.867615]  [&lt;c16b0e00&gt;] ? icmp_send+0xa0/0x380
[ 7249.867648]  [&lt;c16b102f&gt;] icmp_send+0x2cf/0x380
[ 7249.867681]  [&lt;f89c8126&gt;] nf_send_unreach+0xa6/0xc0 [nf_reject_ipv4]
[ 7249.867714]  [&lt;f89cd0da&gt;] reject_tg+0x7a/0x9f [ipt_REJECT]
[ 7249.867746]  [&lt;f88c29a7&gt;] ipt_do_table+0x317/0x70c [ip_tables]
[ 7249.867780]  [&lt;f895e0a6&gt;] ? __nf_conntrack_find_get+0x166/0x3b0
[nf_conntrack]
[ 7249.867838]  [&lt;f895eea8&gt;] ? nf_conntrack_in+0x398/0x600 [nf_conntrack]
[ 7249.867889]  [&lt;f84c0035&gt;] iptable_filter_hook+0x35/0x80 [iptable_filter]
[ 7249.867933]  [&lt;c16776a1&gt;] nf_iterate+0x71/0x80
[ 7249.867970]  [&lt;c1677715&gt;] nf_hook_slow+0x65/0xc0
[ 7249.868002]  [&lt;c1681811&gt;] __ip_local_out_sk+0xc1/0xd0
[ 7249.868034]  [&lt;c1680f30&gt;] ? ip_forward_options+0x1a0/0x1a0
[ 7249.868066]  [&lt;c1681836&gt;] ip_local_out_sk+0x16/0x30
[ 7249.868097]  [&lt;c1684054&gt;] ip_send_skb+0x14/0x80
[ 7249.868129]  [&lt;c16840f4&gt;] ip_push_pending_frames+0x34/0x40
[ 7249.868163]  [&lt;c16844a2&gt;] ip_send_unicast_reply+0x282/0x310
[ 7249.868196]  [&lt;c16a0863&gt;] tcp_v4_send_reset+0x1b3/0x380
[ 7249.868227]  [&lt;c16a1b63&gt;] tcp_v4_rcv+0x323/0x990
[ 7249.868257]  [&lt;c16776a1&gt;] ? nf_iterate+0x71/0x80
[ 7249.868289]  [&lt;c167dc2b&gt;] ip_local_deliver_finish+0x8b/0x230
[ 7249.868322]  [&lt;c167df4c&gt;] ip_local_deliver+0x4c/0xa0
[ 7249.868353]  [&lt;c167dba0&gt;] ? ip_rcv_finish+0x390/0x390
[ 7249.868384]  [&lt;c167d88c&gt;] ip_rcv_finish+0x7c/0x390
[ 7249.868415]  [&lt;c167e280&gt;] ip_rcv+0x2e0/0x420
...

Prior to the VRF change the oif was not set in the flow struct, so the
VRF support should really have only added the vrf_master_ifindex lookup.

Fixes: 613d09b30f8b ("net: Use VRF device index for lookups on TX")
Cc: Andrey Melnikov &lt;temnota.am@gmail.com&gt;
Signed-off-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Add support for VRFs to inetpeer cache</title>
<updated>2015-08-28T20:32:36+00:00</updated>
<author>
<name>David Ahern</name>
<email>dsa@cumulusnetworks.com</email>
</author>
<published>2015-08-27T23:07:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=192132b9a034d87566294be0fba5f8f75c2cf16b'/>
<id>urn:sha1:192132b9a034d87566294be0fba5f8f75c2cf16b</id>
<content type='text'>
inetpeer caches based on address only, so duplicate IP addresses within
a namespace return the same cached entry. Enhance the ipv4 address key
to contain both the IPv4 address and VRF device index.

Signed-off-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vrf: vrf_master_ifindex_rcu is not always called with rcu read lock</title>
<updated>2015-08-20T05:13:20+00:00</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@cumulusnetworks.com</email>
</author>
<published>2015-08-18T18:40:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=18041e31743d278b6323518d20a2ef656c3cc689'/>
<id>urn:sha1:18041e31743d278b6323518d20a2ef656c3cc689</id>
<content type='text'>
While running net-next I hit this:
[  634.073119] ===============================
[  634.073150] [ INFO: suspicious RCU usage. ]
[  634.073182] 4.2.0-rc6+ #45 Not tainted
[  634.073213] -------------------------------
[  634.073244] include/net/vrf.h:38 suspicious rcu_dereference_check()
usage!
[  634.073274]
               other info that might help us debug this:

[  634.073307]
               rcu_scheduler_active = 1, debug_locks = 1
[  634.073338] 2 locks held by swapper/0/0:
[  634.073369]  #0:  (((&amp;n-&gt;timer))){+.-...}, at: [&lt;ffffffff8112bc35&gt;]
call_timer_fn+0x5/0x480
[  634.073412]  #1:  (slock-AF_INET){+.-...}, at: [&lt;ffffffff8174f0f5&gt;]
icmp_send+0x155/0x5f0
[  634.073450]
               stack backtrace:
[  634.073483] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.2.0-rc6+ #45
[  634.073514] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS
VirtualBox 12/01/2006
[  634.073545]  0000000000000000 0593ba8242d9ace4 ffff88002fc03b48
ffffffff81803f1b
[  634.073612]  0000000000000000 ffffffff81e12500 ffff88002fc03b78
ffffffff811003c5
[  634.073642]  0000000000000000 ffff88002ec4e600 ffffffff81f00f80
ffff88002fc03cf0
[  634.073669] Call Trace:
[  634.073694]  &lt;IRQ&gt;  [&lt;ffffffff81803f1b&gt;] dump_stack+0x4c/0x65
[  634.073728]  [&lt;ffffffff811003c5&gt;] lockdep_rcu_suspicious+0xc5/0x100
[  634.073763]  [&lt;ffffffff8174eb56&gt;] icmp_route_lookup+0x176/0x5c0
[  634.073793]  [&lt;ffffffff8174f2fb&gt;] ? icmp_send+0x35b/0x5f0
[  634.073818]  [&lt;ffffffff8174f274&gt;] ? icmp_send+0x2d4/0x5f0
[  634.073844]  [&lt;ffffffff8174f3ce&gt;] icmp_send+0x42e/0x5f0
[  634.073873]  [&lt;ffffffff8170b662&gt;] ipv4_link_failure+0x22/0xa0
[  634.073899]  [&lt;ffffffff8174bdda&gt;] arp_error_report+0x3a/0x80
[  634.073926]  [&lt;ffffffff816d6100&gt;] ? neigh_lookup+0x2c0/0x2c0
[  634.073952]  [&lt;ffffffff816d396e&gt;] neigh_invalidate+0x8e/0x110
[  634.073984]  [&lt;ffffffff816d62ae&gt;] neigh_timer_handler+0x1ae/0x290
[  634.074013]  [&lt;ffffffff816d6100&gt;] ? neigh_lookup+0x2c0/0x2c0
[  634.074013]  [&lt;ffffffff8112bce3&gt;] call_timer_fn+0xb3/0x480
[  634.074013]  [&lt;ffffffff8112bc35&gt;] ? call_timer_fn+0x5/0x480
[  634.074013]  [&lt;ffffffff816d6100&gt;] ? neigh_lookup+0x2c0/0x2c0
[  634.074013]  [&lt;ffffffff8112c2bc&gt;] run_timer_softirq+0x20c/0x430
[  634.074013]  [&lt;ffffffff810af50e&gt;] __do_softirq+0xde/0x630
[  634.074013]  [&lt;ffffffff810afc97&gt;] irq_exit+0x117/0x120
[  634.074013]  [&lt;ffffffff81810976&gt;] smp_apic_timer_interrupt+0x46/0x60
[  634.074013]  [&lt;ffffffff8180e950&gt;] apic_timer_interrupt+0x70/0x80
[  634.074013]  &lt;EOI&gt;  [&lt;ffffffff8106b9d6&gt;] ? native_safe_halt+0x6/0x10
[  634.074013]  [&lt;ffffffff81101d8d&gt;] ? trace_hardirqs_on+0xd/0x10
[  634.074013]  [&lt;ffffffff81027d43&gt;] default_idle+0x23/0x200
[  634.074013]  [&lt;ffffffff8102852f&gt;] arch_cpu_idle+0xf/0x20
[  634.074013]  [&lt;ffffffff810f89ba&gt;] default_idle_call+0x2a/0x40
[  634.074013]  [&lt;ffffffff810f8dcc&gt;] cpu_startup_entry+0x39c/0x4c0
[  634.074013]  [&lt;ffffffff817f9cad&gt;] rest_init+0x13d/0x150
[  634.074013]  [&lt;ffffffff81f69038&gt;] start_kernel+0x4a8/0x4c9
[  634.074013]  [&lt;ffffffff81f68120&gt;] ?
early_idt_handler_array+0x120/0x120
[  634.074013]  [&lt;ffffffff81f68339&gt;] x86_64_start_reservations+0x2a/0x2c
[  634.074013]  [&lt;ffffffff81f68485&gt;] x86_64_start_kernel+0x14a/0x16d

It would seem vrf_master_ifindex_rcu() can be called without RCU held in
other contexts as well so introduce a new helper which acquires rcu and
returns the ifindex.
Also add curly braces around both the "if" and "else" parts as per the
style guide.

Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Fix up inet_addr_type checks</title>
<updated>2015-08-14T05:43:21+00:00</updated>
<author>
<name>David Ahern</name>
<email>dsa@cumulusnetworks.com</email>
</author>
<published>2015-08-13T20:59:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=30bbaa19500559d7625c65632195413f639b3b97'/>
<id>urn:sha1:30bbaa19500559d7625c65632195413f639b3b97</id>
<content type='text'>
Currently inet_addr_type and inet_dev_addr_type expect local addresses
to be in the local table. With the VRF device local routes for devices
associated with a VRF will be in the table associated with the VRF.
Provide an alternate inet_addr lookup to use a specific table rather
than defaulting to the local table.

inet_addr_type_dev_table keeps the same semantics as inet_addr_type but
if the passed in device is enslaved to a VRF then the table for that VRF
is used for the lookup.

Signed-off-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Use VRF device index for lookups on TX</title>
<updated>2015-08-14T05:43:20+00:00</updated>
<author>
<name>David Ahern</name>
<email>dsa@cumulusnetworks.com</email>
</author>
<published>2015-08-13T20:59:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=613d09b30f8b589d5a9b49775054c8865db95d1c'/>
<id>urn:sha1:613d09b30f8b589d5a9b49775054c8865db95d1c</id>
<content type='text'>
As with ingress use the index of VRF master device for route lookups on
egress. However, the oif should only be used to direct the lookups to a
specific table. Routes in the table are not based on the VRF device but
rather interfaces that are part of the VRF so do not consider the oif for
lookups within the table. The FLOWI_FLAG_VRFSRC is used to control this
latter part.

Signed-off-by: Shrijeet Mukherjee &lt;shm@cumulusnetworks.com&gt;
Signed-off-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
