[LEDE-DEV] [PATCH] dnsmasq: add IPv6 nameserver configuration in server mode

Hans Dedecker dedeckeh at gmail.com
Fri May 12 00:20:44 PDT 2017


On Wed, May 10, 2017 at 9:29 PM, Arjen de Korte <build+lede at de-korte.org> wrote:
> When in ra server mode, configure nameservers passed in router
> announcements from the dns value (which is already used by odhcpd).
>
> This also fixes FS#677 by using the global IPv6 address of the router
> instead of the link local address (if no nameservers are configured).
>
> Signed-off-by: Arjen de Korte <build+lede at de-korte.org>
> ---
>  package/network/services/dnsmasq/files/dnsmasq.init | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
> index 1a1941f1d7..7cad06407f 100644
> --- a/package/network/services/dnsmasq/files/dnsmasq.init
> +++ b/package/network/services/dnsmasq/files/dnsmasq.init
> @@ -466,6 +466,7 @@ dhcp_add() {
>         config_get ra "$cfg" ra
>         config_get ra_management "$cfg" ra_management
>         config_get ra_preference "$cfg" ra_preference
> +       config_get dns "$cfg" dns
>
>         # Put the router host name on this DHCP served interface address(es)
>         dhcp_this_host_add "$net" "$ifname" "$ADD_LOCAL_FQDN"
> @@ -533,6 +534,15 @@ dhcp_add() {
>                         xappend "--dhcp-range=$nettag$dhcp6range,constructor:$ifname,slaac,ra-names,$leasetime"
>                         ;;
>                 esac
> +
> +               if [ -n "$dns" ]; then
> +                       dnss=""
> +                       for d in $dns; do append dnss "[$d]" ","; done
> +               else
> +                       dnss="[::]"
> +               fi
> +
> +               dhcp_option_append "option6:dns-server,$dnss" "$networkid"
>         fi
>
>         dhcp_option_add "$cfg" "$networkid"
> --
> 2.12.2
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

Hi,

Patch does not apply cleanly; please rebase on latest version.

Applying: dnsmasq: add IPv6 nameserver configuration in server mode
fatal: sha1 information is lacking or useless
(package/network/services/dnsmasq/files/dnsmasq.init).
Repository lacks necessary blobs to fall back on 3-way merge.

Hans



More information about the Lede-dev mailing list