File avahi-CVE-2009-0758.patch of Package avahi

From 6fabf9d5189cf0efb86af1cd57e5399f8e31112a Mon Sep 17 00:00:00 2001
From: Rob Leslie <rob@mars.org>
Date: Wed, 1 Apr 2009 01:32:33 +0200
Subject: [PATCH] CVE-2009-0758: Reflector creates packet storm on legacy unicast traffic

Fixes rhbz #488314.
---
 avahi-core/server.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

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;
-- 
1.6.3.3