b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | commit 2b6bccca5d9d8ab7f11219a639707b325910a0b1 |
| 2 | Author: Philip Prindeville <philipp@redfish-solutions.com> |
| 3 | Date: Thu Sep 17 00:27:55 2020 +0000 |
| 4 | |
| 5 | Logic for p2p on tunnels incorrectly requires IFF_MULTICAST (#305) |
| 6 | |
| 7 | Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> |
| 8 | |
| 9 | --- a/avahi-core/iface-linux.c |
| 10 | +++ b/avahi-core/iface-linux.c |
| 11 | @@ -105,8 +105,8 @@ static void netlink_callback(AvahiNetlin |
| 12 | (ifinfomsg->ifi_flags & IFF_UP) && |
| 13 | (!m->server->config.use_iff_running || (ifinfomsg->ifi_flags & IFF_RUNNING)) && |
| 14 | ((ifinfomsg->ifi_flags & IFF_LOOPBACK) || |
| 15 | - (ifinfomsg->ifi_flags & IFF_MULTICAST)) && |
| 16 | - (m->server->config.allow_point_to_point || !(ifinfomsg->ifi_flags & IFF_POINTOPOINT)); |
| 17 | + (ifinfomsg->ifi_flags & IFF_MULTICAST) || |
| 18 | + ((ifinfomsg->ifi_flags & IFF_POINTOPOINT) && m->server->config.allow_point_to_point)); |
| 19 | |
| 20 | /* Handle interface attributes */ |
| 21 | l = NLMSG_PAYLOAD(n, sizeof(struct ifinfomsg)); |
| 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 *r |
| 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 | |
| 33 | avahi_free(hw->name); |
| 34 | hw->name = avahi_strndup(sdl->sdl_data, sdl->sdl_nlen); |
| 35 | @@ -428,8 +428,8 @@ static void if_add_interface(struct lifr |
| 36 | (flags & IFF_UP) && |
| 37 | (!m->server->config.use_iff_running || (flags & IFF_RUNNING)) && |
| 38 | ((flags & IFF_LOOPBACK) || |
| 39 | - (flags & IFF_MULTICAST)) && |
| 40 | - (m->server->config.allow_point_to_point || !(flags & IFF_POINTOPOINT)); |
| 41 | + (flags & IFF_MULTICAST) || |
| 42 | + ((flags & IFF_POINTOPOINT) && m->server->config.allow_point_to_point)); |
| 43 | hw->name = avahi_strdup(lifreq->lifr_name); |
| 44 | hw->mtu = mtu; |
| 45 | /* TODO get mac address */ |