]> git.meshlink.io Git - meshlink/commitdiff
Make sure broadcast packet reach the local network interface.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 16 Nov 2004 19:02:54 +0000 (19:02 +0000)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 16 Nov 2004 19:02:54 +0000 (19:02 +0000)
src/net_packet.c

index bb50aa2d982e8cc216d05bae75473eb813b82c42..ed49b0b2add2020cc0e62ec414e009ee72b04e70 100644 (file)
@@ -457,6 +457,12 @@ void broadcast_packet(const node_t *from, vpn_packet_t *packet)
        ifdebug(TRAFFIC) logger(LOG_INFO, _("Broadcasting packet of %d bytes from %s (%s)"),
                           packet->len, from->name, from->hostname);
 
+       if(from != myself) {
+               if(overwrite_mac)
+                        memcpy(packet->data, mymac.x, ETH_ALEN);
+               write_packet(packet);
+       }
+
        for(node = connection_tree->head; node; node = node->next) {
                c = node->data;