Only send packets via UDP if UDP communication is possible.
[tinc] / src / route.c
index ec01491..c458ea4 100644 (file)
@@ -376,11 +376,11 @@ static void route_ipv4(node_t *source, vpn_packet_t *packet)
        if(!checklength(source, packet, ether_size + ip_size))
                return;
 
-       if(((packet->data[30] & 0xf0) == 0xe0) ||
+       if(((packet->data[30] & 0xf0) == 0xe0) || (
                        packet->data[30] == 255 &&
                        packet->data[31] == 255 &&
                        packet->data[32] == 255 &&
-                       packet->data[33] == 255)
+                       packet->data[33] == 255))
                broadcast_packet(source, packet);
        else
                route_ipv4_unicast(source, packet);