Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Petr Menšík
BIND
Commits
7ba05518
Commit
7ba05518
authored
Nov 22, 2000
by
Brian Wellington
Browse files
ipv4-less operation
parent
db237e54
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/nsupdate/nsupdate.c
View file @
7ba05518
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsupdate.c,v 1.6
3
2000/11/22
02:54:15
bwelling Exp $ */
/* $Id: nsupdate.c,v 1.6
4
2000/11/22
21:25:38
bwelling Exp $ */
#include <config.h>
...
...
@@ -85,6 +85,7 @@ extern int h_errno;
static
isc_boolean_t
debugging
=
ISC_FALSE
,
ddebugging
=
ISC_FALSE
;
static
isc_boolean_t
memdebugging
=
ISC_FALSE
;
static
isc_boolean_t
have_ipv4
=
ISC_FALSE
;
static
isc_boolean_t
have_ipv6
=
ISC_FALSE
;
static
isc_boolean_t
is_dst_up
=
ISC_FALSE
;
static
isc_boolean_t
usevc
=
ISC_FALSE
;
...
...
@@ -366,12 +367,16 @@ setup_system(void) {
dns_result_register
();
result
=
isc_net_probeipv4
();
check_result
(
result
,
"isc_net_probeipv4"
);
if
(
result
==
ISC_R_SUCCESS
)
have_ipv4
=
ISC_TRUE
;
result
=
isc_net_probeipv6
();
if
(
result
==
ISC_R_SUCCESS
)
have_ipv6
=
ISC_TRUE
;
if
(
!
have_ipv4
&&
!
have_ipv6
)
fatal
(
"couldn't find either IPv4 or IPv6"
);
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
check_result
(
result
,
"isc_mem_create"
);
...
...
@@ -445,14 +450,17 @@ setup_system(void) {
check_result
(
result
,
"dns_dispatch_getudp (v6)"
);
}
attrs
=
DNS_DISPATCHATTR_UDP
;
attrs
|=
DNS_DISPATCHATTR_MAKEQUERY
;
attrs
|=
DNS_DISPATCHATTR_IPV4
;
isc_sockaddr_any
(
&
bind_any
);
result
=
dns_dispatch_getudp
(
dispatchmgr
,
socketmgr
,
taskmgr
,
&
bind_any
,
PACKETSIZE
,
4
,
2
,
3
,
5
,
attrs
,
attrmask
,
&
dispatchv4
);
check_result
(
result
,
"dns_dispatch_getudp (v4)"
);
if
(
have_ipv4
)
{
attrs
=
DNS_DISPATCHATTR_UDP
;
attrs
|=
DNS_DISPATCHATTR_MAKEQUERY
;
attrs
|=
DNS_DISPATCHATTR_IPV4
;
isc_sockaddr_any
(
&
bind_any
);
result
=
dns_dispatch_getudp
(
dispatchmgr
,
socketmgr
,
taskmgr
,
&
bind_any
,
PACKETSIZE
,
4
,
2
,
3
,
5
,
attrs
,
attrmask
,
&
dispatchv4
);
check_result
(
result
,
"dns_dispatch_getudp (v4)"
);
}
result
=
dns_requestmgr_create
(
mctx
,
timermgr
,
socketmgr
,
taskmgr
,
dispatchmgr
,
...
...
Write
Preview
Supports
Markdown
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