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
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
583
Issues
583
List
Boards
Labels
Service Desk
Milestones
Merge Requests
110
Merge Requests
110
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
BIND
Commits
e5084909
Commit
e5084909
authored
Mar 06, 2018
by
Michał Kępień
1
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '56-replace-getquad-with-inet_pton' into 'master'
Replace getquad() with inet_pton() Closes
#56
See merge request
!99
parents
c047405c
4528b887
Pipeline
#531
failed with stages
in 18 minutes and 41 seconds
Changes
9
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
40 additions
and
30 deletions
+40
-30
CHANGES
CHANGES
+11
-6
doc/arm/notes.xml
doc/arm/notes.xml
+6
-0
lib/dns/rdata.c
lib/dns/rdata.c
+0
-18
lib/dns/rdata/generic/ipseckey_45.c
lib/dns/rdata/generic/ipseckey_45.c
+1
-1
lib/dns/rdata/generic/l32_105.c
lib/dns/rdata/generic/l32_105.c
+1
-1
lib/dns/rdata/hs_4/a_1.c
lib/dns/rdata/hs_4/a_1.c
+2
-1
lib/dns/rdata/in_1/a_1.c
lib/dns/rdata/in_1/a_1.c
+2
-1
lib/dns/rdata/in_1/wks_11.c
lib/dns/rdata/in_1/wks_11.c
+2
-1
lib/dns/tests/rdata_test.c
lib/dns/tests/rdata_test.c
+15
-1
No files found.
CHANGES
View file @
e5084909
4906. [func] Replace getquad() with inet_pton(), completing
change #4900. [GL #56]
4905. [bug] irs_resconf_load() ignored resolv.conf syntax errors
when "domain" or "search" options were present in that
file. [GL #110]
...
...
@@ -15,7 +18,9 @@
for a domain that time out, as well as the servers
that respond. [GL #64]
4900. [cleanup] Remove all uses of inet_aton(). [GL #13]
4900. [func] Remove all uses of inet_aton(). As a result of this
change, IPv4 addresses are now only accepted in
dotted-quad format. [GL #13]
4899. [test] Convert most of the remaining system tests to be able
to run in parallel, continuing the work from change
...
...
@@ -151,11 +156,11 @@
4860. [bug] isc_int8_t should be signed char. [RT #46973]
4859.
[bug]
A loop was possible when attempting to validate
unsigned CNAME responses from secure zones;
this caused a delay in returning SERVFAIL and
also increased the chances of encountering
CVE-2017-3145. [RT #46839]
4859.
[bug]
A loop was possible when attempting to validate
unsigned CNAME responses from secure zones;
this caused a delay in returning SERVFAIL and
also increased the chances of encountering
CVE-2017-3145. [RT #46839]
4858. [security] Addresses could be referenced after being freed
in resolver.c, causing an assertion failure.
...
...
doc/arm/notes.xml
View file @
e5084909
...
...
@@ -88,6 +88,12 @@
been removed. [GL #93]
</para>
</listitem>
<listitem>
<para>
IPv4 addresses in forms other than dotted-quad are no longer
accepted in master files. [GL #13] [GL #56]
</para>
</listitem>
</itemizedlist>
</section>
...
...
lib/dns/rdata.c
View file @
e5084909
...
...
@@ -378,24 +378,6 @@ locator_pton(const char *src, unsigned char *dst) {
return
(
1
);
}
static
inline
int
getquad
(
const
void
*
src
,
struct
in_addr
*
dst
,
isc_lex_t
*
lexer
,
dns_rdatacallbacks_t
*
callbacks
)
{
int
result
;
result
=
inet_pton
(
AF_INET
,
src
,
dst
);
if
(
result
!=
1
&&
callbacks
!=
NULL
)
{
const
char
*
name
=
isc_lex_getsourcename
(
lexer
);
if
(
name
==
NULL
)
name
=
"UNKNOWN"
;
(
*
callbacks
->
warn
)(
callbacks
,
"%s:%lu:
\"
%s
\"
"
"is not a decimal dotted quad"
,
name
,
isc_lex_getsourceline
(
lexer
),
src
);
}
return
(
result
);
}
static
inline
isc_result_t
name_duporclone
(
const
dns_name_t
*
source
,
isc_mem_t
*
mctx
,
dns_name_t
*
target
)
{
...
...
lib/dns/rdata/generic/ipseckey_45.c
View file @
e5084909
...
...
@@ -77,7 +77,7 @@ fromtext_ipseckey(ARGS_FROMTEXT) {
break
;
case
1
:
if
(
getquad
(
DNS_AS_STR
(
token
),
&
addr
,
lexer
,
callbacks
)
!=
1
)
if
(
inet_pton
(
AF_INET
,
DNS_AS_STR
(
token
),
&
addr
)
!=
1
)
RETTOK
(
DNS_R_BADDOTTEDQUAD
);
isc_buffer_availableregion
(
target
,
&
region
);
if
(
region
.
length
<
4
)
...
...
lib/dns/rdata/generic/l32_105.c
View file @
e5084909
...
...
@@ -41,7 +41,7 @@ fromtext_l32(ARGS_FROMTEXT) {
RETERR
(
isc_lex_getmastertoken
(
lexer
,
&
token
,
isc_tokentype_string
,
ISC_FALSE
));
if
(
getquad
(
DNS_AS_STR
(
token
),
&
addr
,
lexer
,
callbacks
)
!=
1
)
if
(
inet_pton
(
AF_INET
,
DNS_AS_STR
(
token
),
&
addr
)
!=
1
)
RETTOK
(
DNS_R_BADDOTTEDQUAD
);
isc_buffer_availableregion
(
target
,
&
region
);
if
(
region
.
length
<
4
)
...
...
lib/dns/rdata/hs_4/a_1.c
View file @
e5084909
...
...
@@ -33,11 +33,12 @@ fromtext_hs_a(ARGS_FROMTEXT) {
UNUSED
(
origin
);
UNUSED
(
options
);
UNUSED
(
rdclass
);
UNUSED
(
callbacks
);
RETERR
(
isc_lex_getmastertoken
(
lexer
,
&
token
,
isc_tokentype_string
,
ISC_FALSE
));
if
(
getquad
(
DNS_AS_STR
(
token
),
&
addr
,
lexer
,
callbacks
)
!=
1
)
if
(
inet_pton
(
AF_INET
,
DNS_AS_STR
(
token
),
&
addr
)
!=
1
)
RETTOK
(
DNS_R_BADDOTTEDQUAD
);
isc_buffer_availableregion
(
target
,
&
region
);
if
(
region
.
length
<
4
)
...
...
lib/dns/rdata/in_1/a_1.c
View file @
e5084909
...
...
@@ -35,11 +35,12 @@ fromtext_in_a(ARGS_FROMTEXT) {
UNUSED
(
origin
);
UNUSED
(
options
);
UNUSED
(
rdclass
);
UNUSED
(
callbacks
);
RETERR
(
isc_lex_getmastertoken
(
lexer
,
&
token
,
isc_tokentype_string
,
ISC_FALSE
));
if
(
getquad
(
DNS_AS_STR
(
token
),
&
addr
,
lexer
,
callbacks
)
!=
1
)
if
(
inet_pton
(
AF_INET
,
DNS_AS_STR
(
token
),
&
addr
)
!=
1
)
RETTOK
(
DNS_R_BADDOTTEDQUAD
);
isc_buffer_availableregion
(
target
,
&
region
);
if
(
region
.
length
<
4
)
...
...
lib/dns/rdata/in_1/wks_11.c
View file @
e5084909
...
...
@@ -93,6 +93,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
UNUSED
(
origin
);
UNUSED
(
options
);
UNUSED
(
rdclass
);
UNUSED
(
callbacks
);
RUNTIME_CHECK
(
isc_once_do
(
&
once
,
init_lock
)
==
ISC_R_SUCCESS
);
...
...
@@ -117,7 +118,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
ISC_FALSE
));
isc_buffer_availableregion
(
target
,
&
region
);
if
(
getquad
(
DNS_AS_STR
(
token
),
&
addr
,
lexer
,
callbacks
)
!=
1
)
if
(
inet_pton
(
AF_INET
,
DNS_AS_STR
(
token
),
&
addr
)
!=
1
)
CHECKTOK
(
DNS_R_BADDOTTEDQUAD
);
if
(
region
.
length
<
4
)
return
(
ISC_R_NOSPACE
);
...
...
lib/dns/tests/rdata_test.c
View file @
e5084909
...
...
@@ -1137,6 +1137,20 @@ ATF_TC_HEAD(wks, tc) {
atf_tc_set_md_var
(
tc
,
"descr"
,
"WKS RDATA manipulations"
);
}
ATF_TC_BODY
(
wks
,
tc
)
{
text_ok_t
text_ok
[]
=
{
/*
* Valid, IPv4 address in dotted-quad form.
*/
TEXT_VALID
(
"127.0.0.1 6"
),
/*
* Invalid, IPv4 address not in dotted-quad form.
*/
TEXT_INVALID
(
"127.1 6"
),
/*
* Sentinel.
*/
TEXT_SENTINEL
()
};
wire_ok_t
wire_ok
[]
=
{
/*
* Too short.
...
...
@@ -1162,7 +1176,7 @@ ATF_TC_BODY(wks, tc) {
UNUSED
(
tc
);
check_rdata
(
NULL
,
wire_ok
,
ISC_FALSE
,
dns_rdataclass_in
,
check_rdata
(
text_ok
,
wire_ok
,
ISC_FALSE
,
dns_rdataclass_in
,
dns_rdatatype_wks
,
sizeof
(
dns_rdata_in_wks_t
));
}
...
...
Ondřej Surý
@ondrej
mentioned in issue
#187 (closed)
·
Mar 28, 2018
mentioned in issue
#187 (closed)
mentioned in issue #187
Toggle commit list
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