[systemd-devel] [PATCH] resolved: fix warnings
Thomas H.P. Andersen
phomes at gmail.com
Mon Aug 11 19:47:06 PDT 2014
On Sat, Jul 19, 2014 at 10:37 AM, Thomas H.P. Andersen <phomes at gmail.com> wrote:
> From: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
>
> ---
> src/resolve/resolved-dns-scope.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
> index 190c5f4..41514a5 100644
> --- a/src/resolve/resolved-dns-scope.c
> +++ b/src/resolve/resolved-dns-scope.c
> @@ -292,7 +292,7 @@ int dns_scope_llmnr_membership(DnsScope *s, bool b) {
> if (s->family == AF_INET) {
> struct ip_mreqn mreqn = {
> .imr_multiaddr = LLMNR_MULTICAST_IPV4_ADDRESS,
> - .imr_ifindex = s->link->ifindex,
> + .imr_ifindex = s->link ? s->link->ifindex : 0,
> };
>
> fd = manager_llmnr_ipv4_udp_fd(s->manager);
> @@ -305,7 +305,7 @@ int dns_scope_llmnr_membership(DnsScope *s, bool b) {
> } else if (s->family == AF_INET6) {
> struct ipv6_mreq mreq = {
> .ipv6mr_multiaddr = LLMNR_MULTICAST_IPV6_ADDRESS,
> - .ipv6mr_interface = s->link->ifindex,
> + .ipv6mr_interface = s->link ? s->link->ifindex : 0,
> };
>
> fd = manager_llmnr_ipv6_udp_fd(s->manager);
> --
> 1.9.3
>
ping
More information about the systemd-devel
mailing list