Re: [BUG] net/ipv4: inconsistent routing table

2015-08-12 Thread Stephen Hemminger
On Wed, 12 Aug 2015 16:14:33 +0800 Zang MingJie wrote: > On Wed, Aug 12, 2015 at 4:52 AM, Alexander Duyck > wrote: > > On 08/10/2015 04:50 AM, Hannes Frederic Sowa wrote: > >> > >> Hello, > >> > >> Zang MingJie writes: > >> > >>> Here comes several options: > >>> > >>> 1. reject local next hop

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-12 Thread Zang MingJie
On Wed, Aug 12, 2015 at 4:52 AM, Alexander Duyck wrote: > On 08/10/2015 04:50 AM, Hannes Frederic Sowa wrote: >> >> Hello, >> >> Zang MingJie writes: >> >>> Here comes several options: >>> >>> 1. reject local next hop w/ EINVAL >>> 2. delete route when local next hop removed >> >> Will also cause

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-11 Thread David Miller
From: Alexander Duyck Date: Tue, 11 Aug 2015 13:52:27 -0700 > On 08/10/2015 04:50 AM, Hannes Frederic Sowa wrote: >>> 4. document it >> I prefer that one :) > > Yeah, me too. The fact is things have worked this way up until now > and I suspect the reason why this hasn't been reported until now

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-11 Thread Alexander Duyck
On 08/10/2015 04:50 AM, Hannes Frederic Sowa wrote: Hello, Zang MingJie writes: Here comes several options: 1. reject local next hop w/ EINVAL 2. delete route when local next hop removed Will also cause some people to complain. 3. transition between RT_SCOPE_HOST amd RT_SCOPE_LINK I don'

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-10 Thread Hannes Frederic Sowa
Hello, Zang MingJie writes: > Here comes several options: > > 1. reject local next hop w/ EINVAL > 2. delete route when local next hop removed Will also cause some people to complain. > 3. transition between RT_SCOPE_HOST amd RT_SCOPE_LINK I don't understand the scope transition. I know Alex

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-10 Thread Zang MingJie
Here comes several options: 1. reject local next hop w/ EINVAL 2. delete route when local next hop removed 3. transition between RT_SCOPE_HOST amd RT_SCOPE_LINK 4. document it which one should we choose ? 1 will definitely cause compatibility problem 2 is the easiest solution 3 need a bit of cod

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-10 Thread Hannes Frederic Sowa
Hello, Zang MingJie writes: > Days ago I mistakenly set the gateway address on my box, then add the > default router, after I deleted the address my box can't access > Internet and all things looks fine. It takes me several hours to > figure out it is an kernel bug. I don't consider this a kerne

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-08 Thread Zang MingJie
Days ago I mistakenly set the gateway address on my box, then add the default router, after I deleted the address my box can't access Internet and all things looks fine. It takes me several hours to figure out it is an kernel bug. >On Sat, Aug 8, 2015, 1:00 AM Hannes Frederic Sowa >wrote: >If we

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-07 Thread Hannes Frederic Sowa
Hello, Alexander Duyck writes: > On 08/07/2015 01:23 AM, Zang MingJie wrote: >> IMO, the routing decision is determined, given a specific routing >> table and local network the result MUST be determined, independence of >> how/what order the routing entry is added. >> >> Now there are two ways to

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-07 Thread Alexander Duyck
On 08/07/2015 01:23 AM, Zang MingJie wrote: IMO, the routing decision is determined, given a specific routing table and local network the result MUST be determined, independence of how/what order the routing entry is added. Now there are two ways to configure the system resulting EXACTLY the sam

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-07 Thread Zang MingJie
IMO, the routing decision is determined, given a specific routing table and local network the result MUST be determined, independence of how/what order the routing entry is added. Now there are two ways to configure the system resulting EXACTLY the same routing table and local addresses, but the r

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-06 Thread Alexander Duyck
On 08/06/2015 03:13 AM, Zang MingJie wrote: On Thu, Aug 6, 2015 at 1:45 AM, Alexander Duyck wrote: On 08/05/2015 02:06 AM, Daniel Borkmann wrote: [ please cc netdev ] On 08/05/2015 10:56 AM, Zang MingJie wrote: Hi: I found a bug when remove an ip address which is referenced by a routing e

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-06 Thread Zang MingJie
On Thu, Aug 6, 2015 at 1:45 AM, Alexander Duyck wrote: > On 08/05/2015 02:06 AM, Daniel Borkmann wrote: >> >> [ please cc netdev ] >> >> On 08/05/2015 10:56 AM, Zang MingJie wrote: >>> >>> Hi: >>> >>> I found a bug when remove an ip address which is referenced by a routing >>> entry. >>> >>> step

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-05 Thread Alexander Duyck
On 08/05/2015 02:06 AM, Daniel Borkmann wrote: [ please cc netdev ] On 08/05/2015 10:56 AM, Zang MingJie wrote: Hi: I found a bug when remove an ip address which is referenced by a routing entry. step to reproduce: ip li add type dummy ip li set dummy0 up ip ad add 10.0.0.1/24 dev dummy0 i

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-05 Thread Daniel Borkmann
[ please cc netdev ] On 08/05/2015 10:56 AM, Zang MingJie wrote: Hi: I found a bug when remove an ip address which is referenced by a routing entry. step to reproduce: ip li add type dummy ip li set dummy0 up ip ad add 10.0.0.1/24 dev dummy0 ip ad add 10.0.0.2/24 dev dummy0 ip ro add default

[BUG] net/ipv4: inconsistent routing table

2015-08-05 Thread Zang MingJie
Hi: I found a bug when remove an ip address which is referenced by a routing entry. step to reproduce: ip li add type dummy ip li set dummy0 up ip ad add 10.0.0.1/24 dev dummy0 ip ad add 10.0.0.2/24 dev dummy0 ip ro add default via 10.0.0.2/24 ip ad del 10.0.0.2/24 dev dummy0 after deleting the