summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2009-03-29 19:11:12 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2009-03-29 19:11:12 +0000
commit1f3f9e9942e32dac60852aa2f34aa67042d73ff1 (patch)
tree024971c20c91af843230169ea4173f7fd6ce6692 /usr.sbin
parenta07010f9b8e5577e75a09b6f6237a189f29794f3 (diff)
In lsa_num_links(), be more obvious about what parts of the LSA
are subtracted from the total length. ok claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospf6d/rde_lsdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ospf6d/rde_lsdb.c b/usr.sbin/ospf6d/rde_lsdb.c
index a44762c80e7..e71a18d1483 100644
--- a/usr.sbin/ospf6d/rde_lsdb.c
+++ b/usr.sbin/ospf6d/rde_lsdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_lsdb.c,v 1.23 2009/03/12 01:21:49 stsp Exp $ */
+/* $OpenBSD: rde_lsdb.c,v 1.24 2009/03/29 19:11:11 stsp Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -556,11 +556,11 @@ lsa_num_links(struct vertex *v)
{
switch (v->type) {
case LSA_TYPE_ROUTER:
- return ((ntohs(v->lsa->hdr.len) - sizeof(struct lsa_hdr)
- - sizeof(u_int32_t)) / sizeof(struct lsa_rtr_link));
+ return ((ntohs(v->lsa->hdr.len) - sizeof(struct lsa_hdr) -
+ sizeof(struct lsa_rtr)) / sizeof(struct lsa_rtr_link));
case LSA_TYPE_NETWORK:
- return ((ntohs(v->lsa->hdr.len) - sizeof(struct lsa_hdr)
- - sizeof(u_int32_t)) / sizeof(struct lsa_net_link));
+ return ((ntohs(v->lsa->hdr.len) - sizeof(struct lsa_hdr) -
+ sizeof(struct lsa_net)) / sizeof(struct lsa_net_link));
default:
fatalx("lsa_num_links: invalid LSA type");
}