diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-01-29 18:52:18 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-01-29 18:52:18 +0000 |
commit | 558c6686a2ca3074fb73e5a9511b75cd6ac00ca4 (patch) | |
tree | 9af31f46c2d65c2100fb91f941780857a2881534 /usr.sbin/ospf6d | |
parent | 5d930390cbf8d0ec602757228dfaa361bb6915ce (diff) |
In Link LSAs, #prefixes is a 32bit value.
But in Intra-Area-Prefix LSAs, #prefixes is a 16bit value.
lsa_intra_a_pref_check() was failing on little-endian machines because
it was trying to byte-swap a 32bit value.
ok claudio@
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r-- | usr.sbin/ospf6d/rde_lsdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospf6d/rde_lsdb.c b/usr.sbin/ospf6d/rde_lsdb.c index 781a6fbac7a..2ab88a2c171 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.16 2009/01/29 16:39:24 claudio Exp $ */ +/* $OpenBSD: rde_lsdb.c,v 1.17 2009/01/29 18:52:17 stsp Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -329,7 +329,7 @@ lsa_intra_a_pref_check(struct lsa *lsa, u_int16_t len) } len -= off; - npref = ntohl(iap->numprefix); + npref = ntohs(iap->numprefix); for (i = 0; i < npref; i++) { rv = lsa_get_prefix(buf + off, len, NULL); |