Bug 188931 - [PATCH] usr.sbin/unbound/local-setup/local-unbound-setup.sh: Abnormal determination of IPv6 addresses
Summary: [PATCH] usr.sbin/unbound/local-setup/local-unbound-setup.sh: Abnormal determi...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: Normal Affects Some People
Assignee: Dag-Erling Smørgrav
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-24 01:00 UTC by takefu
Modified: 2014-09-18 13:54 UTC (History)
1 user (show)

See Also:


Attachments
local-unbound-setup.sh.patch (511 bytes, patch)
2014-04-24 01:00 UTC, takefu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description takefu 2014-04-24 01:00:00 UTC
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
Comment 1 Dag-Erling Smørgrav freebsd_committer 2014-09-08 08:58:56 UTC
Sorry I didn't notice this when it arrived.  I will fix it ASAP and MFC to stable/10 so it is included in 10.1.
Comment 2 commit-hook freebsd_committer 2014-09-08 09:16:54 UTC
A commit references this bug:

Author: des
Date: Mon Sep  8 09:16:07 UTC 2014
New revision: 271255
URL: http://svnweb.freebsd.org/changeset/base/271255

Log:
  Fix support for IPv6 nameservers.

  PR:		188931
  Submitted by:	Takefu <takefu@airport.fm>
  MFC after:	3 days

Changes:
  head/usr.sbin/unbound/local-setup/local-unbound-setup.sh
Comment 3 Dag-Erling Smørgrav freebsd_committer 2014-09-18 13:54:20 UTC
Merged to stable/10 in r271759.