Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dhcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
72
Issues
72
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
dhcp
Commits
9a2f9db5
Commit
9a2f9db5
authored
Dec 17, 2019
by
Thomas Markwalder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[master] Implement and use new option format type 'k'
Merges in
#68
.
parent
79cfe1ac
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
59 additions
and
16 deletions
+59
-16
RELNOTES
RELNOTES
+7
-0
common/options.c
common/options.c
+5
-0
common/parse.c
common/parse.c
+27
-1
common/tables.c
common/tables.c
+6
-2
configure
configure
+1
-1
configure.ac
configure.ac
+1
-1
configure.ac+lt
configure.ac+lt
+1
-1
configure.ac-base
configure.ac-base
+1
-1
configure.ac-lt
configure.ac-lt
+1
-1
server/ldap.c
server/ldap.c
+6
-5
server/stables.c
server/stables.c
+3
-3
No files found.
RELNOTES
View file @
9a2f9db5
...
...
@@ -225,6 +225,13 @@ by Eric Young (eay@cryptsoft.com).
values (e.g. next-server).
[Gitlab #28]
- The option format for the server option omapi-key was changed to a
format type '
k
' (key name); while server options ldap-port and
ldap-init-retry were changed to '
L
' (unsigned 32-bit integer). These
three options were inadvertantly broken when the '
d
' format content
was changed to comply with RFC 1035 wire format (see Gitlab #2).
[Gitlab #68]
Changes since 4.4.0 (New Features)
- none
Changes since 4.4.0 (Bug Fixes)
...
...
common/options.c
View file @
9a2f9db5
...
...
@@ -1631,6 +1631,7 @@ format_has_text(format)
while
(
*
p
!=
'\0'
)
{
switch
(
*
p
++
)
{
case
't'
:
case
'k'
:
return
1
;
/* These symbols are arbitrary, not fixed or
...
...
@@ -1762,6 +1763,7 @@ format_min_length(format, oc)
case
'A'
:
/* Array of all that precedes. */
case
'a'
:
/* Array of preceding symbol. */
case
'Z'
:
/* nothing. */
case
'k'
:
/* key name */
return
min_len
;
case
'c'
:
/* Compress flag for D atom. */
...
...
@@ -1903,7 +1905,9 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
}
hunksize
+=
k
;
break
;
case
't'
:
case
'k'
:
fmtbuf
[
l
+
1
]
=
0
;
numhunk
=
-
2
;
break
;
...
...
@@ -2047,6 +2051,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
for
(;
j
<
numelem
;
j
++
)
{
switch
(
fmtbuf
[
j
])
{
case
't'
:
case
'k'
:
/* endbuf-1 leaves room for NULL. */
k
=
pretty_text
(
&
op
,
endbuf
-
1
,
&
dp
,
data
+
len
,
emit_quotes
);
...
...
common/parse.c
View file @
9a2f9db5
...
...
@@ -5058,7 +5058,33 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
POST
(
freeval
);
}
break
;
case
'k'
:
/* key name */
token
=
peek_token
(
&
val
,
&
len
,
cfile
);
if
(
token
==
STRING
)
{
token
=
next_token
(
&
val
,
&
len
,
cfile
);
}
else
{
val
=
parse_host_name
(
cfile
);
if
(
!
val
)
{
parse_warn
(
cfile
,
"not a valid key name."
);
skip_to_semi
(
cfile
);
return
0
;
}
freeval
=
ISC_TRUE
;
}
if
(
!
make_const_data
(
&
t
,
(
const
unsigned
char
*
)
val
,
strlen
(
val
),
1
,
1
,
MDL
))
{
log_fatal
(
"No memory key name"
);
}
if
(
freeval
==
ISC_TRUE
)
{
dfree
((
char
*
)
val
,
MDL
);
freeval
=
ISC_FALSE
;
}
break
;
case
'N'
:
f
=
(
*
fmt
)
+
1
;
g
=
strchr
(
*
fmt
,
'.'
);
...
...
common/tables.c
View file @
9a2f9db5
...
...
@@ -84,10 +84,14 @@ HASH_FUNCTIONS (option_code, const unsigned *, struct option,
the name of the set of enumeration values to parse or emit,
followed by a '.'. The width of the data is specified in the
named enumeration. Named enumerations are tracked in parse.c.
d - Domain name (i.e., FOO or FOO.BAR).
D - Domain list (i.e., example.com eng.example.com)
d - Domain name (e.g., FOO or FOO.BAR) no quotes,
on-wire format is RFC 1035.
D - Domain list (e.g., "example.com eng.example.com") quoted,
on-wire format is RFC 1035.
c - When following a 'D' atom, enables compression pointers.
Z - Zero-length option
k - Key name, unquoted string (e.g. mykey.com or some-text or abc123)
parsed with parse_host_name().
*/
struct
universe
dhcp_universe
;
...
...
configure
View file @
9a2f9db5
...
...
@@ -5591,7 +5591,7 @@ fi
# Testing section
# Bind Makefile needs to know ATF is not included.
if
0
;
then
if
test
"foo"
=
"barr"
;
then
BIND_ATF_TRUE
=
BIND_ATF_FALSE
=
'#'
else
...
...
configure.ac
View file @
9a2f9db5
...
...
@@ -250,7 +250,7 @@ fi
# Testing section
# Bind Makefile needs to know ATF is not included.
AM_CONDITIONAL(BIND_ATF,
0
)
AM_CONDITIONAL(BIND_ATF,
test "foo" = "barr"
)
DISTCHECK_ATF_CONFIGURE_FLAG=
atf_path="no"
...
...
configure.ac+lt
View file @
9a2f9db5
...
...
@@ -251,7 +251,7 @@ fi
# Testing section
# Bind Makefile needs to know ATF is not included.
AM_CONDITIONAL(BIND_ATF,
0
)
AM_CONDITIONAL(BIND_ATF,
test "foo" = "barr"
)
DISTCHECK_ATF_CONFIGURE_FLAG=
atf_path="no"
...
...
configure.ac-base
View file @
9a2f9db5
...
...
@@ -256,7 +256,7 @@ fi
# Testing section
# Bind Makefile needs to know ATF is not included.
AM_CONDITIONAL(BIND_ATF,
0
)
AM_CONDITIONAL(BIND_ATF,
test "foo" = "barr"
)
DISTCHECK_ATF_CONFIGURE_FLAG=
atf_path="no"
...
...
configure.ac-lt
View file @
9a2f9db5
...
...
@@ -250,7 +250,7 @@ fi
# Testing section
# Bind Makefile needs to know ATF is not included.
AM_CONDITIONAL(BIND_ATF,
0
)
AM_CONDITIONAL(BIND_ATF,
test "foo" = "barr"
)
DISTCHECK_ATF_CONFIGURE_FLAG=
atf_path="no"
...
...
server/ldap.c
View file @
9a2f9db5
...
...
@@ -1137,7 +1137,7 @@ _do_lookup_dhcp_int_option (struct option_state *options, int option_name)
{
struct
option_cache
*
oc
;
struct
data_string
db
;
int
ret
;
int
ret
=
0
;
memset
(
&
db
,
0
,
sizeof
(
db
));
oc
=
lookup_option
(
&
server_universe
,
options
,
option_name
);
...
...
@@ -1147,13 +1147,14 @@ _do_lookup_dhcp_int_option (struct option_state *options, int option_name)
(
struct
client_state
*
)
NULL
,
options
,
(
struct
option_state
*
)
NULL
,
&
global_scope
,
oc
,
MDL
)
&&
db
.
data
!=
NULL
&&
*
db
.
data
!=
'\0'
)
db
.
data
!=
NULL
)
{
ret
=
strtol
((
const
char
*
)
db
.
data
,
NULL
,
10
);
if
(
db
.
len
==
4
)
{
ret
=
getULong
(
db
.
data
);
}
data_string_forget
(
&
db
,
MDL
);
}
else
ret
=
0
;
return
(
ret
);
}
...
...
server/stables.c
View file @
9a2f9db5
...
...
@@ -211,7 +211,7 @@ static struct option server_options[] = {
{
"limited-broadcast-address"
,
"I"
,
&
server_universe
,
33
,
1
},
{
"remote-port"
,
"S"
,
&
server_universe
,
34
,
1
},
{
"local-address"
,
"I"
,
&
server_universe
,
35
,
1
},
{
"omapi-key"
,
"
d
"
,
&
server_universe
,
36
,
1
},
{
"omapi-key"
,
"
k
"
,
&
server_universe
,
36
,
1
},
{
"stash-agent-options"
,
"f"
,
&
server_universe
,
37
,
1
},
{
"ddns-ttl"
,
"T"
,
&
server_universe
,
38
,
1
},
{
"ddns-update-style"
,
"Nddns-styles."
,
&
server_universe
,
39
,
1
},
...
...
@@ -241,7 +241,7 @@ static struct option server_options[] = {
#endif
#if defined(LDAP_CONFIGURATION)
{
"ldap-server"
,
"t"
,
&
server_universe
,
60
,
1
},
{
"ldap-port"
,
"
d
"
,
&
server_universe
,
61
,
1
},
{
"ldap-port"
,
"
L
"
,
&
server_universe
,
61
,
1
},
{
"ldap-username"
,
"t"
,
&
server_universe
,
62
,
1
},
{
"ldap-password"
,
"t"
,
&
server_universe
,
63
,
1
},
{
"ldap-base-dn"
,
"t"
,
&
server_universe
,
64
,
1
},
...
...
@@ -259,7 +259,7 @@ static struct option server_options[] = {
{
"ldap-tls-crlcheck"
,
"Nldap-tls-crlcheck."
,
&
server_universe
,
75
,
1
},
{
"ldap-tls-ciphers"
,
"t"
,
&
server_universe
,
76
,
1
},
{
"ldap-tls-randfile"
,
"t"
,
&
server_universe
,
77
,
1
},
{
"ldap-init-retry"
,
"
d
"
,
&
server_universe
,
SV_LDAP_INIT_RETRY
,
1
},
{
"ldap-init-retry"
,
"
L
"
,
&
server_universe
,
SV_LDAP_INIT_RETRY
,
1
},
#endif
/* LDAP_USE_SSL */
#if defined(LDAP_USE_GSSAPI)
{
"ldap-gssapi-keytab"
,
"t"
,
&
server_universe
,
SV_LDAP_GSSAPI_KEYTAB
,
1
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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