aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_hash.c
diff options
context:
space:
mode:
authorMilan Kocian <milon@wq.cz>2007-05-23 17:55:06 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-05-24 19:36:53 -0400
commitb8f558313506b5bc435f2e031f3bec4b1725098e (patch)
treee82ba2864feff645abfd31ac49b3c235e48ded3d /net/ipv4/fib_hash.c
parent8a903be129a741fd1e1d44223f0e3a01c357bde5 (diff)
[RTNETLINK]: Fix sending netlink message when replace route.
When you replace route via ip r r command the netlink multicast message is not send. This patch corrects it. NL message is sent with NLM_F_REPLACE flag. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=8320 Signed-off-by: Milan Kocian <milon@wq.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_hash.c')
-rw-r--r--net/ipv4/fib_hash.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 9cfecf1215c9..07e843a47dde 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -456,6 +456,8 @@ static int fn_hash_insert(struct fib_table *tb, struct fib_config *cfg)
456 fib_release_info(fi_drop); 456 fib_release_info(fi_drop);
457 if (state & FA_S_ACCESSED) 457 if (state & FA_S_ACCESSED)
458 rt_cache_flush(-1); 458 rt_cache_flush(-1);
459 rtmsg_fib(RTM_NEWROUTE, key, fa, cfg->fc_dst_len, tb->tb_id,
460 &cfg->fc_nlinfo, NLM_F_REPLACE);
459 return 0; 461 return 0;
460 } 462 }
461 463
@@ -523,7 +525,7 @@ static int fn_hash_insert(struct fib_table *tb, struct fib_config *cfg)
523 rt_cache_flush(-1); 525 rt_cache_flush(-1);
524 526
525 rtmsg_fib(RTM_NEWROUTE, key, new_fa, cfg->fc_dst_len, tb->tb_id, 527 rtmsg_fib(RTM_NEWROUTE, key, new_fa, cfg->fc_dst_len, tb->tb_id,
526 &cfg->fc_nlinfo); 528 &cfg->fc_nlinfo, 0);
527 return 0; 529 return 0;
528 530
529out_free_new_fa: 531out_free_new_fa:
@@ -589,7 +591,7 @@ static int fn_hash_delete(struct fib_table *tb, struct fib_config *cfg)
589 591
590 fa = fa_to_delete; 592 fa = fa_to_delete;
591 rtmsg_fib(RTM_DELROUTE, key, fa, cfg->fc_dst_len, 593 rtmsg_fib(RTM_DELROUTE, key, fa, cfg->fc_dst_len,
592 tb->tb_id, &cfg->fc_nlinfo); 594 tb->tb_id, &cfg->fc_nlinfo, 0);
593 595
594 kill_fn = 0; 596 kill_fn = 0;
595 write_lock_bh(&fib_hash_lock); 597 write_lock_bh(&fib_hash_lock);