Only send packets via UDP if UDP communication is possible.
[oweals/tinc.git] / src / net.c
index 1682705da74153241b3a96571ab5f8b6f37bdf54..9e4829a35b75fcefba7eaaab3d044db8c2071d00 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -295,8 +295,10 @@ static void check_network_activity(fd_set * readset, fd_set * writeset)
 
        /* check input from kernel */
        if(FD_ISSET(device_fd, readset)) {
-               if(read_packet(&packet))
+               if(read_packet(&packet)) {
+                       packet.priority = 0;
                        route(myself, &packet);
+               }
        }
 
        /* check meta connections */