From b66abe8ef986698caccd08b38a991330f0791075 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Thu, 15 Oct 2009 00:28:04 +0200 Subject: Reimplements 'show ospf state' for OSPFv3 and fixes some bugs. --- proto/ospf/topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'proto/ospf/topology.c') diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 6f7905b..ac442d9 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -881,11 +881,11 @@ originate_ext_lsa_body(net *n, rte *e, u16 *length, struct proto_ospf *po, ext = mb_alloc(p->pool, size); *length = sizeof(struct ospf_lsa_header) + size; - ext->metric = (m1 != LSINFINITY) ? m1 : (m2 & LSA_EXT_EBIT); + ext->metric = (m1 != LSINFINITY) ? m1 : (m2 | LSA_EXT_EBIT); #ifdef OSPFv2 ext->netmask = ipa_mkmask(n->n.pxlen); - ext->fwaddr = gw ? IPA_NONE : e->attrs->gw; + ext->fwaddr = gw ? e->attrs->gw : IPA_NONE; ext->tag = tag; #else /* OSPFv3 */ buf = ext->rest; -- cgit v1.2.3