bin/188931: [PATCH][unbound] Abnormal determination of IPv6 addresses

Takefu takefu at airport.fm
Thu Apr 24 00:00:00 UTC 2014


>Number:         188931
>Category:       bin
>Synopsis:       [PATCH][unbound] Abnormal determination of IPv6 addresses
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 24 00:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Takefu
>Release:        FreeBSD 10.0-RELEASE-p1 i386
>Organization:
FOX Amateur Radio Club
>Environment:
System: FreeBSD RELENG10-ix86.localIPv4.airport.fm 10.0-RELEASE-p1 FreeBSD 10.0-RELEASE-p1 #0: Tue Apr 8 06:43:36 UTC 2014 root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Service local_unbound first-run /etc/resolv.conf file in the IPv6 address describing a conversion.
To convert the IPv6 address as the hostname, so do not properly forward.

This patch has not fully tested.
>How-To-Repeat:

----	example.sh
#!/bin/sh
gen_forward_conf() {
	echo "# Generated by $self"
	echo "forward-zone:"
 	echo "        name: ."
	for forwarder ; do
		if expr "${forwarder}" : "^[0-9:.]\{1,\}$" >/dev/null ; then
 			echo "        forward-addr: ${forwarder}"
		else
 			echo "        forward-host: ${forwarder}"
		fi
	done
}

gen_forward_conf 192.0.2.0 127.0.0.1 2001:db8::1 ::1 FE80::1 localhost HOGEHOGE

exit
----	example.sh

> sh example.sh
# Generated by
forward-zone:
        name: .
        forward-addr: 192.0.2.0
        forward-addr: 127.0.0.1
        forward-host: 2001:db8::1
        forward-addr: ::1
        forward-host: FE80::1
        forward-host: localhost
        forward-host: HOGEHOGE

>Fix:

--- local-unbound-setup.sh.patch begins here ---
--- usr.sbin/unbound/local-setup/local-unbound-setup.sh.orig	2014-01-29 14:43:52.000000000 +0900
+++ usr.sbin/unbound/local-setup/local-unbound-setup.sh	2014-04-24 08:09:12.000000000 +0900
@@ -172,7 +172,7 @@
 	echo "forward-zone:"
 	echo "        name: ."
 	for forwarder ; do
-		if expr "${forwarder}" : "^[0-9:.]\{1,\}$" >/dev/null ; then
+		if expr "${forwarder}" : "^[0-9:.a-fA-F]\{1,\}$" >/dev/null ; then
 			echo "        forward-addr: ${forwarder}"
 		else
 			echo "        forward-host: ${forwarder}"
--- local-unbound-setup.sh.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list