diff options
author | Shawn Routhier <sar@isc.org> | 2012-01-05 00:03:18 +0000 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2012-01-05 00:03:18 +0000 |
commit | de6c9af6dd9d520708be323e34cd9dd7e15880f4 (patch) | |
tree | 109f8d504a8635c688d31f510afc1db14e6900c0 /server/mdb6.c | |
parent | dc6908b477c6a8433e58739c80a169ebb900a6f4 (diff) | |
download | isc-dhcp-de6c9af6dd9d520708be323e34cd9dd7e15880f4.tar.gz |
Fixed the code that checks if an address the server is planning
to hand out is in a reserved range. This would appear as
the server being out of addresses in pools with particular ranges.
[ISC-Bugs #26498]
Diffstat (limited to 'server/mdb6.c')
-rw-r--r-- | server/mdb6.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/mdb6.c b/server/mdb6.c index 1925be00..d08016af 100644 --- a/server/mdb6.c +++ b/server/mdb6.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2007-2012 by Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -808,15 +808,14 @@ create_lease6(struct ipv6_pool *pool, struct iasubopt **addr, } /* - * Avoid reserved interface IDs. - * (cf. draft-krishnan-ipv6-reserved-iids-02.txt) + * Avoid reserved interface IDs. (cf. RFC 5453) */ reserved_iid = ISC_FALSE; - if (memcmp(&tmp.s6_addr[8], &rtany, 8) == 0) { + if (memcmp(&tmp.s6_addr[8], &rtany.s6_addr[8], 8) == 0) { reserved_iid = ISC_TRUE; } if (!reserved_iid && - (memcmp(&tmp.s6_addr[8], &resany, 7) == 0) && + (memcmp(&tmp.s6_addr[8], &resany.s6_addr[8], 7) == 0) && ((tmp.s6_addr[15] & 0x80) == 0x80)) { reserved_iid = ISC_TRUE; } |