X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fiface-linux.c;h=c1843dd962283f90545ea66222d61d9f4b38e9c3;hb=28948f72a2689afe0ba8a31fd396a0c7faf7c213;hp=98fdea561cba6a2975974f61f0032c0b28cb66e6;hpb=a97605e07ad7f44f2f65e15be64880e61a39ab43;p=catta diff --git a/avahi-core/iface-linux.c b/avahi-core/iface-linux.c index 98fdea5..c1843dd 100644 --- a/avahi-core/iface-linux.c +++ b/avahi-core/iface-linux.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /*** This file is part of avahi. @@ -55,7 +53,7 @@ static int netlink_list_items(AvahiNetlink *nl, uint16_t type, unsigned *ret_seq n = (struct nlmsghdr*) req; n->nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg)); n->nlmsg_type = type; - n->nlmsg_flags = NLM_F_ROOT|NLM_F_REQUEST; + n->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP; n->nlmsg_pid = 0; gen = NLMSG_DATA(n); @@ -205,7 +203,7 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat while (RTA_OK(a, l)) { switch(a->rta_type) { - case IFA_ADDRESS: + case IFA_LOCAL: /* Fill in address data */ if ((raddr.proto == AVAHI_PROTO_INET6 && RTA_PAYLOAD(a) != 16) || @@ -240,6 +238,7 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat /* Update the scope field for the address */ addr->global_scope = ifaddrmsg->ifa_scope == RT_SCOPE_UNIVERSE || ifaddrmsg->ifa_scope == RT_SCOPE_SITE; + addr->deprecated = !!(ifaddrmsg->ifa_flags & IFA_F_DEPRECATED); } else { AvahiInterfaceAddress *addr; assert(n->nlmsg_type == RTM_DELADDR);