Bug#635479: openresolv: Feature request: DHCPv6 support in DHCP hook script
Hi Geoff On Tue, 2011-07-26 at 00:12 -0700, Geoffrey Sisson wrote: This patch adds basic DHCPv6 support for openresolv. It's unlikely that this is a comlete patch. For example, some applications might resonably expect resolvconf -d eth0 to remove both the IPv4 and IPv6 interface information. However, it does provide basic DHCPv6 functionality. The patch looks good, but my understanding is that ISC dhclient can only operate for IPv4 OR IPv6 and not both at the same time. As such, why make a distinction in protocol when dealing with resolvconf? Thanks Roy -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#635479: openresolv: Feature request: DHCPv6 support in DHCP hook script
Roy Marples r...@marples.name wrote: On Tue, 2011-07-26 at 00:12 -0700, Geoffrey Sisson wrote: This patch adds basic DHCPv6 support for openresolv. It's unlikely that this is a comlete patch. For example, some applications might resonably expect resolvconf -d eth0 to remove both the IPv4 and IPv6 interface information. However, it does provide basic DHCPv6 functionality. The patch looks good, but my understanding is that ISC dhclient can only operate for IPv4 OR IPv6 and not both at the same time. Hi Roy, That's correct. As such, why make a distinction in protocol when dealing with resolvconf? DHCPv4 can't be used to transport IPv6 config info, and DHCPv6 can't be used to transport IPv4 config info, so for a dual-stack DHCP client you have to run two instances of ISC dhclient -- one DHCPv4 session and one DHCPv6 session. (More of course if you have more than one interface under DHCP control.) If you want both IPv4 and IPv6 addresses for resolvers in resolv.conf at the same time, openresolv has to distinguish between by protocol as well as by interface; otherwise you end up with the same race between protocols that you had among interfaces. I'm not sure whether appending _ipv6 to interface names is the most elegant fix, but I wanted to provide a simple proof-of-concept. It may be cleaner to make the interfaces into directories, e.g.: /var/run/resolvconf/interface/eth0/ipv4 /var/run/resolvconf/interface/eth0/ipv6 /var/run/resolvconf/interface/eth1/ipv4 /var/run/resolvconf/interface/eth1/ipv6 . . . Geoff -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#635479: openresolv: Feature request: DHCPv6 support in DHCP hook script
Package: openresolv Version: 3.4.0-1 Severity: wishlist Tags: patch ipv6 This patch adds basic DHCPv6 support for openresolv. It's unlikely that this is a comlete patch. For example, some applications might resonably expect resolvconf -d eth0 to remove both the IPv4 and IPv6 interface information. However, it does provide basic DHCPv6 functionality. Geoff Begin included text --- debian.orig/dhclient +++ debian/dhclient @@ -1,25 +1,47 @@ # resolvconf support for dhclient3 if [ -x /sbin/resolvconf ]; then + # Undefine default make_resolv_conf(), just in case. make_resolv_conf() { - local conf= - if [ -n $new_domain_name ]; then - conf=${conf}domain ${new_domain_name}\n - fi - if [ -n $new_domain_search ]; then - conf=${conf}search ${new_domain_search}\n - fi - for nameserver in $new_domain_name_servers; do - conf=${conf}nameserver $nameserver\n - done - [ -n $conf ] conf=# resolv.conf for $interface\n${conf} - [ -z $interface -a -n $conf ] || printf $conf | \ - /sbin/resolvconf -a $interface + true; } - case $reason in + BOUND|RENEW|REBIND|REBOOT|TIMEOUT) + make_resolv_conf() { + local conf= + if [ -n $new_domain_name ]; then + conf=${conf}domain ${new_domain_name}\n + fi + if [ -n $new_domain_search ]; then + conf=${conf}search ${new_domain_search}\n + fi + for nameserver in $new_domain_name_servers; do + conf=${conf}nameserver $nameserver\n + done + [ -n $conf ] conf=# resolv.conf for $interface\n${conf} + [ -z $interface -a -n $conf ] || printf $conf | \ + /sbin/resolvconf -a $interface + } + ;; + BOUND6|RENEW6|REBIND6) + make_resolv_conf() { + local conf= + if [ -n $new_dhcp6_domain_search ]; then + conf=${conf}search ${new_dhcp6_domain_search}\n + fi + for nameserver in $new_dhcp6_name_servers; do + conf=${conf}nameserver $nameserver\n + done + [ -n $conf ] conf=# resolv.conf for $interface\n${conf} + [ -z $interface -a -n $conf ] || printf $conf | \ + /sbin/resolvconf -a ${interface}_ipv6 + } + ;; EXPIRE|FAIL|RELEASE|STOP) [ -z $interface ] || /sbin/resolvconf -f -d $interface ;; + EXPIRE6|RELEASE6|STOP6) + [ -z $interface ] || /sbin/resolvconf -f -d ${interface}_ipv6 + ;; esac fi - End included text - -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.39-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org