summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6ctl
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2009-01-29 16:34:33 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2009-01-29 16:34:33 +0000
commitcf5d81ad29ee9b4a99507b1bc425e1189eada280 (patch)
tree53b99bfc54ff57b1b9f34c44bca70f6c802608c7 /usr.sbin/ospf6ctl
parent2636ad5130144f1b4822e37e6566fc0017969131 (diff)
Fix offset calculation for lsa_prefix structs.
ok claudio@
Diffstat (limited to 'usr.sbin/ospf6ctl')
-rw-r--r--usr.sbin/ospf6ctl/ospf6ctl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ospf6ctl/ospf6ctl.c b/usr.sbin/ospf6ctl/ospf6ctl.c
index 83e1de3c6c8..c315cb4abeb 100644
--- a/usr.sbin/ospf6ctl/ospf6ctl.c
+++ b/usr.sbin/ospf6ctl/ospf6ctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospf6ctl.c,v 1.20 2009/01/28 22:51:26 stsp Exp $ */
+/* $OpenBSD: ospf6ctl.c,v 1.21 2009/01/29 16:34:32 stsp Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -769,7 +769,8 @@ show_db_msg_detail(struct imsg *imsg)
printf(" Prefix Length: %d, Options: %x\n",
prefix->prefixlen, prefix->options);
- off += sizeof(struct lsa_prefix);
+ off += sizeof(struct lsa_prefix)
+ + LSA_PREFIXSIZE(prefix->prefixlen);
}
printf("\n");
@@ -876,7 +877,8 @@ show_db_msg_detail(struct imsg *imsg)
printf(" Prefix Length: %d, Options: %x\n",
prefix->prefixlen, prefix->options);
- off += sizeof(struct lsa_prefix);
+ off += sizeof(struct lsa_prefix)
+ + LSA_PREFIXSIZE(prefix->prefixlen);
}
break;
case IMSG_CTL_SHOW_DB_SUM: