Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
95443028
Commit
95443028
authored
Mar 25, 2013
by
Thomas Markwalder
Browse files
Merge branch 'trac2789' - Addressed review comments
parents
93cb134f
f3507e17
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcpsrv/pool.cc
View file @
95443028
// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012
-2013
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -64,7 +64,7 @@ Pool4::Pool4(const isc::asiolink::IOAddress& prefix,
Pool6
::
Pool6
(
Pool6Type
type
,
const
isc
::
asiolink
::
IOAddress
&
first
,
const
isc
::
asiolink
::
IOAddress
&
last
)
:
Pool
(
first
,
last
),
type_
(
type
)
,
prefix_len_
(
0
)
{
:
Pool
(
first
,
last
),
type_
(
type
)
{
// check if specified address boundaries are sane
if
(
!
first
.
isV6
()
||
!
last
.
isV6
())
{
...
...
@@ -95,16 +95,15 @@ Pool6::Pool6(Pool6Type type, const isc::asiolink::IOAddress& first,
Pool6
::
Pool6
(
Pool6Type
type
,
const
isc
::
asiolink
::
IOAddress
&
prefix
,
uint8_t
prefix_len
)
:
Pool
(
prefix
,
IOAddress
(
"::"
)),
type_
(
type
)
,
prefix_len_
(
prefix_len
)
{
type_
(
type
)
{
// check if the prefix is sane
if
(
!
prefix
.
isV6
())
{
isc_throw
(
BadValue
,
"Invalid Pool6 address boundaries: not IPv6"
);
}
// check if the prefix length is sane (we use the member variable only
// for silencing some compilers; see #2705 and #2789).
if
(
prefix_len_
==
0
||
prefix_len_
>
128
)
{
// check if the prefix length is sane
if
(
prefix_len
==
0
||
prefix_len
>
128
)
{
isc_throw
(
BadValue
,
"Invalid prefix length"
);
}
...
...
src/lib/dhcpsrv/pool.h
View file @
95443028
// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012
-2013
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -168,9 +168,6 @@ private:
/// @brief defines a pool type
Pool6Type
type_
;
/// @brief prefix length
/// used by TYPE_PD only (zeroed for other types)
uint8_t
prefix_len_
;
};
/// @brief a pointer an IPv6 Pool
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment