summaryrefslogtreecommitdiffstats
path: root/proto/ospf/topology.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-10-15 00:28:04 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-10-15 00:28:04 +0200
commitb66abe8ef986698caccd08b38a991330f0791075 (patch)
treef5b8fc17395f7f6f74f7e50bfc84272ed01b2eb3 /proto/ospf/topology.c
parentd82fc18d75e4ebf615657cb5d98f000c728b13e4 (diff)
downloadbird-b66abe8ef986698caccd08b38a991330f0791075.tar
bird-b66abe8ef986698caccd08b38a991330f0791075.zip
Reimplements 'show ospf state' for OSPFv3 and fixes some bugs.
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r--proto/ospf/topology.c4
1 files changed, 2 insertions, 2 deletions
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;