View | Details | Raw Unified | Return to bug 787 | Differences between
and this patch

Collapse All | Expand All

(-)b/doc/unbound.conf.5.in (+4 lines)
 Lines 340-345   IPv6 to the internet nameservers. With this option you can disable the Link Here 
340
ipv6 transport for sending DNS traffic, it does not impact the contents of
340
ipv6 transport for sending DNS traffic, it does not impact the contents of
341
the DNS traffic, which may have ip4 and ip6 addresses in it.
341
the DNS traffic, which may have ip4 and ip6 addresses in it.
342
.TP
342
.TP
343
.B prefer\-ip6: \fI<yes or no>
344
If enabled, prefer IPv6 transport for sending DNS queries to internet
345
nameservers. Default is no.
346
.TP
343
.B do\-udp: \fI<yes or no>
347
.B do\-udp: \fI<yes or no>
344
Enable or disable whether UDP queries are answered or issued. Default is yes.
348
Enable or disable whether UDP queries are answered or issued. Default is yes.
345
.TP
349
.TP
(-)b/iterator/iter_utils.c (+33 lines)
 Lines 360-365   iter_filter_order(struct iter_env* iter_env, struct module_env* env, Link Here 
360
		}
360
		}
361
	}
361
	}
362
	*selected_rtt = low_rtt;
362
	*selected_rtt = low_rtt;
363
364
	if (env->cfg->prefer_ip6) {
365
		int got_num6 = 0;
366
		int low_rtt6 = 0;
367
		prev = NULL;
368
		a = dp->result_list;
369
		int i;
370
		for(i = 0; i < got_num; i++) {
371
			swap_to_front = 0;
372
			if(a->addr.ss_family == AF_INET6) {
373
				got_num6++;
374
				swap_to_front = 1;
375
				if(low_rtt6 == 0 || a->sel_rtt < low_rtt6) {
376
					low_rtt6 = a->sel_rtt;
377
				}
378
			}
379
			/* swap to front if IPv6, or move to next result */
380
			if(swap_to_front && prev) {
381
				n = a->next_result;
382
				prev->next_result = n;
383
				a->next_result = dp->result_list;
384
				dp->result_list = a;
385
				a = n;
386
			} else {
387
				prev = a;
388
				a = a->next_result;
389
			}
390
		}
391
		if(got_num6 > 0) {
392
			got_num = got_num6;
393
			*selected_rtt = low_rtt6;
394
		}
395
	}
363
	return got_num;
396
	return got_num;
364
}
397
}
365
398
(-)b/smallapp/unbound-checkconf.c (+2 lines)
 Lines 330-335   morechecks(struct config_file* cfg, const char* fname) Link Here 
330
		fatal_exit("num_threads value weird");
330
		fatal_exit("num_threads value weird");
331
	if(!cfg->do_ip4 && !cfg->do_ip6)
331
	if(!cfg->do_ip4 && !cfg->do_ip6)
332
		fatal_exit("ip4 and ip6 are both disabled, pointless");
332
		fatal_exit("ip4 and ip6 are both disabled, pointless");
333
	if(!cfg->do_ip6 && cfg->prefer_ip6)
334
		fatal_exit("cannot prefer and disable ip6, pointless");
333
	if(!cfg->do_udp && !cfg->do_tcp)
335
	if(!cfg->do_udp && !cfg->do_tcp)
334
		fatal_exit("udp and tcp are both disabled, pointless");
336
		fatal_exit("udp and tcp are both disabled, pointless");
335
	if(cfg->edns_buffer_size > cfg->msg_buffer_size)
337
	if(cfg->edns_buffer_size > cfg->msg_buffer_size)
(-)b/util/config_file.h (+2 lines)
 Lines 75-80   struct config_file { Link Here 
75
	int do_ip4;
75
	int do_ip4;
76
	/** do ip6 query support. */
76
	/** do ip6 query support. */
77
	int do_ip6;
77
	int do_ip6;
78
	/** prefer ip6 upstream queries. */
79
	int prefer_ip6;
78
	/** do udp query support. */
80
	/** do udp query support. */
79
	int do_udp;
81
	int do_udp;
80
	/** do tcp query support. */
82
	/** do tcp query support. */
(-)b/util/configlexer.lex (+1 lines)
 Lines 216-221   outgoing-num-tcp{COLON} { YDVAR(1, VAR_OUTGOING_NUM_TCP) } Link Here 
216
incoming-num-tcp{COLON}		{ YDVAR(1, VAR_INCOMING_NUM_TCP) }
216
incoming-num-tcp{COLON}		{ YDVAR(1, VAR_INCOMING_NUM_TCP) }
217
do-ip4{COLON}			{ YDVAR(1, VAR_DO_IP4) }
217
do-ip4{COLON}			{ YDVAR(1, VAR_DO_IP4) }
218
do-ip6{COLON}			{ YDVAR(1, VAR_DO_IP6) }
218
do-ip6{COLON}			{ YDVAR(1, VAR_DO_IP6) }
219
prefer-ip6{COLON}		{ YDVAR(1, VAR_PREFER_IP6) }
219
do-udp{COLON}			{ YDVAR(1, VAR_DO_UDP) }
220
do-udp{COLON}			{ YDVAR(1, VAR_DO_UDP) }
220
do-tcp{COLON}			{ YDVAR(1, VAR_DO_TCP) }
221
do-tcp{COLON}			{ YDVAR(1, VAR_DO_TCP) }
221
tcp-upstream{COLON}		{ YDVAR(1, VAR_TCP_UPSTREAM) }
222
tcp-upstream{COLON}		{ YDVAR(1, VAR_TCP_UPSTREAM) }
(-)b/util/configparser.y (-3 / +12 lines)
 Lines 69-75   extern struct config_parser_state* cfg_parser; Link Here 
69
%token <str> STRING_ARG
69
%token <str> STRING_ARG
70
%token VAR_SERVER VAR_VERBOSITY VAR_NUM_THREADS VAR_PORT
70
%token VAR_SERVER VAR_VERBOSITY VAR_NUM_THREADS VAR_PORT
71
%token VAR_OUTGOING_RANGE VAR_INTERFACE
71
%token VAR_OUTGOING_RANGE VAR_INTERFACE
72
%token VAR_DO_IP4 VAR_DO_IP6 VAR_DO_UDP VAR_DO_TCP 
72
%token VAR_DO_IP4 VAR_DO_IP6 VAR_PREFER_IP6 VAR_DO_UDP VAR_DO_TCP
73
%token VAR_TCP_MSS VAR_OUTGOING_TCP_MSS
73
%token VAR_TCP_MSS VAR_OUTGOING_TCP_MSS
74
%token VAR_CHROOT VAR_USERNAME VAR_DIRECTORY VAR_LOGFILE VAR_PIDFILE
74
%token VAR_CHROOT VAR_USERNAME VAR_DIRECTORY VAR_LOGFILE VAR_PIDFILE
75
%token VAR_MSG_CACHE_SIZE VAR_MSG_CACHE_SLABS VAR_NUM_QUERIES_PER_THREAD
75
%token VAR_MSG_CACHE_SIZE VAR_MSG_CACHE_SLABS VAR_NUM_QUERIES_PER_THREAD
 Lines 146-152   contents_server: contents_server content_server Link Here 
146
	| ;
146
	| ;
147
content_server: server_num_threads | server_verbosity | server_port |
147
content_server: server_num_threads | server_verbosity | server_port |
148
	server_outgoing_range | server_do_ip4 |
148
	server_outgoing_range | server_do_ip4 |
149
	server_do_ip6 | server_do_udp | server_do_tcp | 
149
	server_do_ip6 | server_prefer_ip6 |
150
	server_do_udp | server_do_tcp |
150
	server_tcp_mss | server_outgoing_tcp_mss |
151
	server_tcp_mss | server_outgoing_tcp_mss |
151
	server_interface | server_chroot | server_username | 
152
	server_interface | server_chroot | server_username | 
152
	server_directory | server_logfile | server_pidfile |
153
	server_directory | server_logfile | server_pidfile |
 Lines 406-411   server_do_tcp: VAR_DO_TCP STRING_ARG Link Here 
406
		free($2);
407
		free($2);
407
	}
408
	}
408
	;
409
	;
410
server_prefer_ip6: VAR_PREFER_IP6 STRING_ARG
411
	{
412
		OUTYY(("P(server_prefer_ip6:%s)\n", $2));
413
		if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
414
			yyerror("expected yes or no.");
415
		else cfg_parser->cfg->prefer_ip6 = (strcmp($2, "yes")==0);
416
		free($2);
417
	}
418
	;
409
server_tcp_mss: VAR_TCP_MSS STRING_ARG
419
server_tcp_mss: VAR_TCP_MSS STRING_ARG
410
	{
420
	{
411
		OUTYY(("P(server_tcp_mss:%s)\n", $2));
421
		OUTYY(("P(server_tcp_mss:%s)\n", $2));
412
- 

Return to bug 787