From: Rob Leslie Date: Tue, 31 Mar 2009 23:32:33 +0000 (+0200) Subject: CVE-2009-0758: Reflector creates packet storm on legacy unicast traffic X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=6fabf9d5189cf0efb86af1cd57e5399f8e31112a;p=catta CVE-2009-0758: Reflector creates packet storm on legacy unicast traffic Fixes rhbz #488314. --- diff --git a/avahi-core/server.c b/avahi-core/server.c index 73ae1cb..bb625a5 100644 --- a/avahi-core/server.c +++ b/avahi-core/server.c @@ -844,7 +844,7 @@ static int originates_from_local_legacy_unicast_socket(AvahiServer *s, const Ava if (getsockname(s->fd_legacy_unicast_ipv4, (struct sockaddr*) &lsa, &l) != 0) avahi_log_warn("getsockname(): %s", strerror(errno)); else - return lsa.sin_port == port; + return avahi_port_from_sockaddr((struct sockaddr*) &lsa) == port; } @@ -855,7 +855,7 @@ static int originates_from_local_legacy_unicast_socket(AvahiServer *s, const Ava if (getsockname(s->fd_legacy_unicast_ipv6, (struct sockaddr*) &lsa, &l) != 0) avahi_log_warn("getsockname(): %s", strerror(errno)); else - return lsa.sin6_port == port; + return avahi_port_from_sockaddr((struct sockaddr*) &lsa) == port; } return 0;