aboutsummaryrefslogtreecommitdiff
path: root/net/avahi-app
diff options
context:
space:
mode:
Diffstat (limited to 'net/avahi-app')
-rw-r--r--net/avahi-app/Makefile2
-rw-r--r--net/avahi-app/files/patch-avahi-core_iface-pfroute.c57
2 files changed, 52 insertions, 7 deletions
diff --git a/net/avahi-app/Makefile b/net/avahi-app/Makefile
index 484d3b5bd80d..60ccdcafd41e 100644
--- a/net/avahi-app/Makefile
+++ b/net/avahi-app/Makefile
@@ -8,7 +8,7 @@
PORTNAME= avahi
PORTVERSION= 0.6.22
-PORTREVISION?= 3
+PORTREVISION?= 4
CATEGORIES?= net dns
MASTER_SITES= http://www.avahi.org/download/
PKGNAMESUFFIX?= -app
diff --git a/net/avahi-app/files/patch-avahi-core_iface-pfroute.c b/net/avahi-app/files/patch-avahi-core_iface-pfroute.c
index 59b5f601f284..7f1d180aa83e 100644
--- a/net/avahi-app/files/patch-avahi-core_iface-pfroute.c
+++ b/net/avahi-app/files/patch-avahi-core_iface-pfroute.c
@@ -1,20 +1,65 @@
---- avahi-core/iface-pfroute.c.orig 2008-04-05 15:54:11.000000000 -0400
-+++ avahi-core/iface-pfroute.c 2008-04-05 16:04:04.000000000 -0400
-@@ -172,6 +177,13 @@ static void rtm_addr(struct rt_msghdr *r
+--- avahi-core/iface-pfroute.c.orig 2007-09-03 08:32:41.000000000 -0400
++++ avahi-core/iface-pfroute.c 2008-04-06 15:06:36.000000000 -0400
+@@ -125,7 +125,7 @@ static void rtm_addr(struct rt_msghdr *r
+ int raddr_valid = 0;
+ struct ifa_msghdr *ifam = (struct ifa_msghdr *) rtm;
+ char *cp = (char *)(ifam + 1);
+- int addrs = ifam->ifam_addrs;
++ char *cp0;
+ int i;
+ int prefixlen = 0;
+ struct sockaddr *sa =NULL;
+@@ -135,17 +135,30 @@ static void rtm_addr(struct rt_msghdr *r
+ ((struct sockaddr *)cp)->sa_family = AF_INET;
+ #endif
+
+- if(((struct sockaddr *)cp)->sa_family != AF_INET && ((struct sockaddr *)cp)->sa_family != AF_INET6)
++ for (cp0 = cp, i = 0; i < RTAX_MAX; i++) {
++ if (!(ifam->ifam_addrs & (1<<i)))
++ continue;
++ sa = (struct sockaddr *)cp;
++ if (i == RTAX_IFA)
++ break;
++#ifdef SA_SIZE
++ cp += SA_SIZE(sa);
++#else
++ ADVANCE(cp, sa);
++#endif
++ }
++
++ if(sa->sa_family != AF_INET && sa->sa_family != AF_INET6)
+ return;
+
+- if (!(iface = avahi_interface_monitor_get_interface(m, (AvahiIfIndex) ifam->ifam_index, avahi_af_to_proto(((struct sockaddr *)cp)->sa_family))))
++ if (!(iface = avahi_interface_monitor_get_interface(m, (AvahiIfIndex) ifam->ifam_index, avahi_af_to_proto(sa->sa_family))))
+ return;
+
+- raddr.proto = avahi_af_to_proto(((struct sockaddr *)cp)->sa_family);
++ raddr.proto = avahi_af_to_proto(sa->sa_family);
+
+- for(i = 0; addrs != 0 && i < RTAX_MAX; addrs &= ~(1<<i), i++)
++ for(cp = cp0, i = 0; i < RTAX_MAX; i++)
+ {
+- if (!(addrs & 1<<i))
++ if (!(ifam->ifam_addrs & (1<<i)))
+ continue;
+ sa = (struct sockaddr *)cp;
+ #ifdef HAVE_SYS_SYSCTL_H
+@@ -172,6 +185,13 @@ static void rtm_addr(struct rt_msghdr *r
break;
case RTA_IFA:
memcpy(raddr.data.data, &((struct sockaddr_in6 *)sa)->sin6_addr, sizeof(struct in6_addr));
+#ifdef __KAME__
+ if (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)raddr.data.data))
-+ {
-+ ((struct in6_addr *)raddr.data.data)->s6_addr[2] = 0;
++ {
++ ((struct in6_addr *)raddr.data.data)->s6_addr[2] = 0;
+ ((struct in6_addr *)raddr.data.data)->s6_addr[3] = 0;
+ }
+#endif
raddr_valid = 1;
default:
break;
-@@ -196,9 +207,12 @@ static void rtm_addr(struct rt_msghdr *r
+@@ -196,9 +216,12 @@ static void rtm_addr(struct rt_msghdr *r
if (!(addriface = avahi_interface_monitor_get_address(m, iface, &raddr)))
if (!(addriface = avahi_interface_address_new(m, iface, &raddr, prefixlen)))
return; /* OOM */