[systemd-devel] [PATCH] resolved: don't fail if IPv6 is not available

Lennart Poettering lennart at poettering.net
Wed Aug 13 06:04:20 PDT 2014


On Wed, 13.08.14 09:33, Michael Olbrich (m.olbrich at pengutronix.de) wrote:

Heya,

I applied a different patch now that makes sure we either get the full
IPv6 support or none at all, and doesn't generate a warning.

Please have a look, if this fixes things for you.

Thanks for the patch anyway,

Lennart

> ---
>  src/resolve/resolved-manager.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
> index a2de2ed..7063af5 100644
> --- a/src/resolve/resolved-manager.c
> +++ b/src/resolve/resolved-manager.c
> @@ -429,7 +429,9 @@ static int manager_llmnr_start(Manager *m) {
>          r = manager_llmnr_ipv6_udp_fd(m);
>          if (r == -EADDRINUSE)
>                  goto eaddrinuse;
> -        if (r < 0)
> +        if (r == -EAFNOSUPPORT)
> +                log_warning("Failed to setup LLMNR IPv6 UDP socket: %s", strerror(-r));
> +        else if (r < 0)
>                  return r;
>  
>          r = manager_llmnr_ipv4_tcp_fd(m);
> @@ -441,7 +443,9 @@ static int manager_llmnr_start(Manager *m) {
>          r = manager_llmnr_ipv6_tcp_fd(m);
>          if (r == -EADDRINUSE)
>                  goto eaddrinuse;
> -        if (r < 0)
> +        if (r == -EAFNOSUPPORT)
> +                log_warning("Failed to setup LLMNR IPv6 TCP socket: %s", strerror(-r));
> +        else if (r < 0)
>                  return r;
>  
>          return 0;


Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list