summaryrefslogtreecommitdiff
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index edca5959..191aa456 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -1234,7 +1234,6 @@ show_lsa_sum_rt(struct top_hash_entry *he)
static inline void
show_lsa_external(struct top_hash_entry *he)
{
- struct ospf_lsa_header *lsa = &(he->lsa);
struct ospf_lsa_ext *ext = he->lsa_body;
char str_via[STD_ADDRESS_P_LENGTH + 8] = "";
char str_tag[16] = "";
@@ -1245,7 +1244,7 @@ show_lsa_external(struct top_hash_entry *he)
rt_metric = ext->metric & METRIC_MASK;
ebit = ext->metric & LSA_EXT_EBIT;
#ifdef OSPFv2
- ip = ipa_and(ipa_from_u32(lsa->id), ext->netmask);
+ ip = ipa_and(ipa_from_u32(he->lsa.id), ext->netmask);
pxlen = ipa_mklen(ext->netmask);
rt_fwaddr = ext->fwaddr;
rt_fwaddr_valid = !ipa_equal(rt_fwaddr, IPA_NONE);
@@ -1282,10 +1281,7 @@ show_lsa_external(struct top_hash_entry *he)
static inline void
show_lsa_prefix(struct top_hash_entry *he, struct ospf_lsa_header *olsa)
{
- struct ospf_lsa_header *lsa = &(he->lsa);
struct ospf_lsa_prefix *px = he->lsa_body;
- struct ospf_lsa_ext *ext = he->lsa_body;
- char *msg;
ip_addr pxa;
int pxlen;
u8 pxopts;
@@ -1504,8 +1500,10 @@ ospf_sh_lsadb(struct proto *p)
break;
#ifdef OSPFv3
case LSA_SCOPE_LINK:
- struct iface *ifa = if_find_by_index(hea[i]->domain);
- cli_msg(-1017, "Link %s", (ifa != NULL) ? ifa->name : "?");
+ {
+ struct iface *ifa = if_find_by_index(hea[i]->domain);
+ cli_msg(-1017, "Link %s", (ifa != NULL) ? ifa->name : "?");
+ }
break;
#endif
}