diff options
author | 2009-01-29 18:52:17 +0000 | |
---|---|---|
committer | 2009-01-29 18:52:17 +0000 | |
commit | bd4e879f6521ee40052b1a4903d9061b8a02d414 (patch) | |
tree | 83df75c429675c5bff16c9b3fbb405df9b8527c5 | |
parent | - fix .Nm and .Dt (diff) | |
download | wireguard-openbsd-bd4e879f6521ee40052b1a4903d9061b8a02d414.tar.xz wireguard-openbsd-bd4e879f6521ee40052b1a4903d9061b8a02d414.zip |
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@
-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); |