From cf5d81ad29ee9b4a99507b1bc425e1189eada280 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Thu, 29 Jan 2009 16:34:33 +0000 Subject: Fix offset calculation for lsa_prefix structs. ok claudio@ --- usr.sbin/ospf6ctl/ospf6ctl.c | 8 +++++--- 1 file 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 @@ -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: -- cgit v1.2.3