summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-08-06 11:09:13 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2012-08-06 11:09:13 +0200
commitc06de722ddf36f3d6aaabfd4ae9d74a3ea72bbf9 (patch)
tree9d0a20e90aece34f11a8bdcba0408c3bed491c05 /proto/ospf
parent5400c0e7f982757418a0aeb892459b52fbbcffc3 (diff)
Some minor fixes.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/lsupd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index f71c72d1..16967a7f 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -502,15 +502,17 @@ ospf_lsupd_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
continue;
}
#else /* OSPFv3 */
+ u16 scope = ntoht(lsa->type) & LSA_SCOPE_MASK;
+
/* 4.5.1 (2) */
- if ((LSA_SCOPE(lsa) == LSA_SCOPE_AS) && !oa_is_ext(ifa->oa))
+ if ((scope == LSA_SCOPE_AS) && !oa_is_ext(ifa->oa))
{
log(L_WARN "Received LSA with AS scope in stub area from %I", n->ip);
continue;
}
/* 4.5.1 (3) */
- if ((LSA_SCOPE(lsa) == LSA_SCOPE_RES))
+ if (scope == LSA_SCOPE_RES)
{
log(L_WARN "Received LSA with invalid scope from %I", n->ip);
continue;