diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-05-01 12:56:05 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-05-01 12:56:05 +0000 |
commit | a98e9bb7b03360436119edd88230330b78dac64f (patch) | |
tree | a33009802145f1f4131308ed682d5bed829f9d92 /usr.sbin/bgpd/kroute.c | |
parent | ea51f26a9ea20a6a28bf9c568c913175d6989102 (diff) |
On reload the filtersets attached to a network need to be moved to the
existing network element. First free the old filterset and then move
the new on top of it. This solves the reload issue with changing network
statements. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/kroute.c')
-rw-r--r-- | usr.sbin/bgpd/kroute.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index 9fc68355ac7..666f437624b 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.187 2011/03/07 07:43:02 henning Exp $ */ +/* $OpenBSD: kroute.c,v 1.188 2011/05/01 12:56:04 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1155,6 +1155,8 @@ kr_net_reload(u_int rtableid, struct network_head *nh) xn = kr_net_find(kt, n); if (xn) { xn->net.old = 0; + filterset_free(&xn->net.attrset); + filterset_move(&n->net.attrset, &xn->net.attrset); kr_net_delete(n); } else TAILQ_INSERT_TAIL(&kt->krn, n, entry); |