aboutsummaryrefslogtreecommitdiffstats
path: root/net/avahi-app
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2008-04-06 04:09:08 +0800
committermarcus <marcus@FreeBSD.org>2008-04-06 04:09:08 +0800
commit5d86b4f3bccbbc122bc4fba6ba60ff8644d5c633 (patch)
tree94acf9ea1214a70387141913d12077c042a889dc /net/avahi-app
parent7db90a1c334f8986419b671fa78447515f337cb1 (diff)
downloadfreebsd-ports-gnome-5d86b4f3bccbbc122bc4fba6ba60ff8644d5c633.tar.gz
freebsd-ports-gnome-5d86b4f3bccbbc122bc4fba6ba60ff8644d5c633.tar.zst
freebsd-ports-gnome-5d86b4f3bccbbc122bc4fba6ba60ff8644d5c633.zip
* Clear out the scope ID from the IPv6 address [1]
* Properly determine if an IPv6 address is global or not Reported by: Ashish Shukla <wahjava.ml@gmail.com> Sumbitted by: ume [1]
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.c32
2 files changed, 33 insertions, 1 deletions
diff --git a/net/avahi-app/Makefile b/net/avahi-app/Makefile
index 3bd79b734dd2..484d3b5bd80d 100644
--- a/net/avahi-app/Makefile
+++ b/net/avahi-app/Makefile
@@ -8,7 +8,7 @@
PORTNAME= avahi
PORTVERSION= 0.6.22
-PORTREVISION?= 2
+PORTREVISION?= 3
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
new file mode 100644
index 000000000000..59b5f601f284
--- /dev/null
+++ b/net/avahi-app/files/patch-avahi-core_iface-pfroute.c
@@ -0,0 +1,32 @@
+--- 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
+ 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[3] = 0;
++ }
++#endif
+ raddr_valid = 1;
+ default:
+ break;
+@@ -196,9 +207,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 */
+- /* FIXME */
+- /* addriface->global_scope = ifaddrmsg->ifa_scope == RT_SCOPE_UNIVERSE || ifaddrmsg->ifa_scope == RT_SCOPE_SITE; */
+- addriface->global_scope = 1;
++ if (raddr.proto == AVAHI_PROTO_INET6)
++ {
++ addriface->global_scope = !(IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)raddr.data.data) || IN6_IS_ADDR_MULTICAST((struct in6_addr *)raddr.data.data));
++ }
++ else
++ addriface->global_scope = 1;
+ }
+ else
+ {