linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ipv4: fill in table id when replacing a route
@ 2015-05-22 11:40 Michal Kubecek
  2015-05-22 15:39 ` Alexander Duyck
  2015-05-22 18:35 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Michal Kubecek @ 2015-05-22 11:40 UTC (permalink / raw)
  To: David S. Miller
  Cc: Alexander Duyck, netdev, linux-kernel, Alexey Kuznetsov,
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy

When replacing an IPv4 route, tb_id member of the new fib_alias
structure is not set in the replace code path so that the new route is
ignored.

Fixes: 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse")

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
---
 net/ipv4/fib_trie.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 64c2076ced54..09b62e17dd8c 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1164,6 +1164,7 @@ int fib_table_insert(struct fib_table *tb, struct fib_config *cfg)
 			state = fa->fa_state;
 			new_fa->fa_state = state & ~FA_S_ACCESSED;
 			new_fa->fa_slen = fa->fa_slen;
+			new_fa->tb_id = tb->tb_id;
 
 			err = netdev_switch_fib_ipv4_add(key, plen, fi,
 							 new_fa->fa_tos,
-- 
2.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] ipv4: fill in table id when replacing a route
  2015-05-22 11:40 [PATCH net] ipv4: fill in table id when replacing a route Michal Kubecek
@ 2015-05-22 15:39 ` Alexander Duyck
  2015-05-22 18:35 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Duyck @ 2015-05-22 15:39 UTC (permalink / raw)
  To: Michal Kubecek, David S. Miller
  Cc: netdev, linux-kernel, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy

On 05/22/2015 04:40 AM, Michal Kubecek wrote:
> When replacing an IPv4 route, tb_id member of the new fib_alias
> structure is not set in the replace code path so that the new route is
> ignored.
>
> Fixes: 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse")
>
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
> ---
>   net/ipv4/fib_trie.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
> index 64c2076ced54..09b62e17dd8c 100644
> --- a/net/ipv4/fib_trie.c
> +++ b/net/ipv4/fib_trie.c
> @@ -1164,6 +1164,7 @@ int fib_table_insert(struct fib_table *tb, struct fib_config *cfg)
>   			state = fa->fa_state;
>   			new_fa->fa_state = state & ~FA_S_ACCESSED;
>   			new_fa->fa_slen = fa->fa_slen;
> +			new_fa->tb_id = tb->tb_id;
>
>   			err = netdev_switch_fib_ipv4_add(key, plen, fi,
>   							 new_fa->fa_tos,
>

The patch looks good.  Thanks.

Acked-by: Alexander Duyck <alexander.h.duyck@redhat.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] ipv4: fill in table id when replacing a route
  2015-05-22 11:40 [PATCH net] ipv4: fill in table id when replacing a route Michal Kubecek
  2015-05-22 15:39 ` Alexander Duyck
@ 2015-05-22 18:35 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-05-22 18:35 UTC (permalink / raw)
  To: mkubecek
  Cc: alexander.h.duyck, netdev, linux-kernel, kuznet, jmorris,
	yoshfuji, kaber

From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 22 May 2015 13:40:09 +0200 (CEST)

> When replacing an IPv4 route, tb_id member of the new fib_alias
> structure is not set in the replace code path so that the new route is
> ignored.
> 
> Fixes: 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse")
> 
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

Applied, thanks.

In the future, please do not put an empty line between the Fixes: and
other tags.  I fixed it up for you this time.  Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-22 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22 11:40 [PATCH net] ipv4: fill in table id when replacing a route Michal Kubecek
2015-05-22 15:39 ` Alexander Duyck
2015-05-22 18:35 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).