summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_proto.c
diff options
context:
space:
mode:
authorhasso <hasso>2004-08-15 07:52:07 +0200
committerhasso <hasso>2004-08-15 07:52:07 +0200
commit6452df092bf6b694ea62a0423ac242f10ab997f9 (patch)
tree087490eb5e58209ca207f28b626c4a4a84ad4c9c /ospf6d/ospf6_proto.c
parentInclude padding in control message length. (diff)
downloadfrr-6452df092bf6b694ea62a0423ac242f10ab997f9.tar.xz
frr-6452df092bf6b694ea62a0423ac242f10ab997f9.zip
SVN revisions 916-920 from Zebra. ABR support is almost done.
Diffstat (limited to 'ospf6d/ospf6_proto.c')
-rw-r--r--ospf6d/ospf6_proto.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ospf6d/ospf6_proto.c b/ospf6d/ospf6_proto.c
index 7ee7e0a73..5b47cf80a 100644
--- a/ospf6d/ospf6_proto.c
+++ b/ospf6d/ospf6_proto.c
@@ -36,12 +36,15 @@ ospf6_prefix_apply_mask (struct ospf6_prefix *op)
offset = op->prefix_length % 8;
mask = 0xff << (8 - offset);
- if (index >= 16)
+ if (index > 16)
{
- zlog_warn ("Apply mask to ospf6_prefix failed");
+ zlog_warn ("Prefix length too long: %d", op->prefix_length);
return;
}
+ if (index == 16)
+ return;
+
pnt[index] &= mask;
index ++;