diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-07-19 09:16:31 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-07-19 09:16:31 +0000 |
commit | 161865ff46b418fe53585dbb12a2cac0f1e1eff1 (patch) | |
tree | f9cdc09dc89060074e8da9c940d6ef643aa6f5dd /usr.sbin/ospfd | |
parent | eed12aff26a1a3ce1c453a98be9d86173f39ebbf (diff) |
When removing an announced prefix inherit the metric and ext_tag from the
LSA that is currently in the tree. Pruning with default metrics is bad
since the checksum of the LSA is different and therefor an additional
update cycle is needed to convince the other systems.
OK bluhm@, sthen@
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r-- | usr.sbin/ospfd/rde.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c index 1dd96577f0a..0d7480cb07f 100644 --- a/usr.sbin/ospfd/rde.c +++ b/usr.sbin/ospfd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.86 2010/07/01 21:19:57 bluhm Exp $ */ +/* $OpenBSD: rde.c,v 1.87 2010/07/19 09:16:30 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -1182,6 +1182,20 @@ orig_asext_lsa(struct rroute *rr, u_int16_t age) lsa->hdr.ls_id = rr->kr.prefix.s_addr; lsa->data.asext.mask = prefixlen2mask(rr->kr.prefixlen); + if (age == MAX_AGE) { + /* inherit metric and ext_tag from the current LSA, + * some routers don't like to get withdraws that are + * different from what they have in their table. + */ + struct vertex *v; + v = lsa_find(NULL, lsa->hdr.type, lsa->hdr.ls_id, + lsa->hdr.adv_rtr); + if (v != NULL) { + rr->metric = ntohl(v->lsa->data.asext.metric); + rr->kr.ext_tag = ntohl(v->lsa->data.asext.ext_tag); + } + } + /* * nexthop -- on connected routes we are the nexthop, * in other cases we may announce the true nexthop if the |