avahi-ipv6only.patch 790 B

12345678910111213141516171819
  1. diff -urpN avahi-0.6.22.orig/avahi-core/socket.c avahi-0.6.22/avahi-core/socket.c
  2. --- avahi-0.6.22.orig/avahi-core/socket.c 2007-12-16 22:03:08.000000000 +0100
  3. +++ avahi-0.6.22/avahi-core/socket.c 2008-03-31 17:13:24.000000000 +0200
  4. @@ -394,13 +394,13 @@ int avahi_open_socket_ipv6(int no_reuse)
  5. avahi_log_warn("IPV6_UNICAST_HOPS failed: %s", strerror(errno));
  6. goto fail;
  7. }
  8. -
  9. +#ifdef IPV6_V6ONLY
  10. yes = 1;
  11. if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof(yes)) < 0) {
  12. avahi_log_warn("IPV6_V6ONLY failed: %s", strerror(errno));
  13. goto fail;
  14. }
  15. -
  16. +#endif
  17. yes = 1;
  18. if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) {
  19. avahi_log_warn("IPV6_MULTICAST_LOOP failed: %s", strerror(errno));