You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.5 KiB

  1. commit 2b6bccca5d9d8ab7f11219a639707b325910a0b1
  2. Author: Philip Prindeville <philipp@redfish-solutions.com>
  3. Date: Thu Sep 17 00:27:55 2020 +0000
  4. Logic for p2p on tunnels incorrectly requires IFF_MULTICAST (#305)
  5. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
  6. diff --git a/avahi-core/iface-linux.c b/avahi-core/iface-linux.c
  7. index e116c7b..75089c4 100644
  8. --- a/avahi-core/iface-linux.c
  9. +++ b/avahi-core/iface-linux.c
  10. @@ -105,8 +105,8 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat
  11. (ifinfomsg->ifi_flags & IFF_UP) &&
  12. (!m->server->config.use_iff_running || (ifinfomsg->ifi_flags & IFF_RUNNING)) &&
  13. ((ifinfomsg->ifi_flags & IFF_LOOPBACK) ||
  14. - (ifinfomsg->ifi_flags & IFF_MULTICAST)) &&
  15. - (m->server->config.allow_point_to_point || !(ifinfomsg->ifi_flags & IFF_POINTOPOINT));
  16. + (ifinfomsg->ifi_flags & IFF_MULTICAST) ||
  17. + ((ifinfomsg->ifi_flags & IFF_POINTOPOINT) && m->server->config.allow_point_to_point));
  18. /* Handle interface attributes */
  19. l = NLMSG_PAYLOAD(n, sizeof(struct ifinfomsg));
  20. diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c
  21. index 45fd970..4eafce0 100644
  22. --- a/avahi-core/iface-pfroute.c
  23. +++ b/avahi-core/iface-pfroute.c
  24. @@ -81,8 +81,8 @@ static void rtm_info(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m)
  25. (ifm->ifm_flags & IFF_UP) &&
  26. (!m->server->config.use_iff_running || (ifm->ifm_flags & IFF_RUNNING)) &&
  27. ((ifm->ifm_flags & IFF_LOOPBACK) ||
  28. - (ifm->ifm_flags & IFF_MULTICAST)) &&
  29. - (m->server->config.allow_point_to_point || !(ifm->ifm_flags & IFF_POINTOPOINT));
  30. + (ifm->ifm_flags & IFF_MULTICAST) ||
  31. + ((ifm->ifm_flags & IFF_POINTOPOINT) && m->server->config.allow_point_to_point));
  32. avahi_free(hw->name);
  33. hw->name = avahi_strndup(sdl->sdl_data, sdl->sdl_nlen);
  34. @@ -428,8 +428,8 @@ static void if_add_interface(struct lifreq *lifreq, AvahiInterfaceMonitor *m, in
  35. (flags & IFF_UP) &&
  36. (!m->server->config.use_iff_running || (flags & IFF_RUNNING)) &&
  37. ((flags & IFF_LOOPBACK) ||
  38. - (flags & IFF_MULTICAST)) &&
  39. - (m->server->config.allow_point_to_point || !(flags & IFF_POINTOPOINT));
  40. + (flags & IFF_MULTICAST) ||
  41. + ((flags & IFF_POINTOPOINT) && m->server->config.allow_point_to_point));
  42. hw->name = avahi_strdup(lifreq->lifr_name);
  43. hw->mtu = mtu;
  44. /* TODO get mac address */