receive_packet(c->node, &outpkt);
}
-static void send_udppacket(node_t *n, vpn_packet_t *inpkt)
+static void send_udppacket(node_t *n, vpn_packet_t *origpkt)
{
vpn_packet_t pkt1, pkt2;
vpn_packet_t *pkt[] = { &pkt1, &pkt2, &pkt1, &pkt2 };
+ vpn_packet_t *inpkt = origpkt;
int nextpkt = 0;
vpn_packet_t *outpkt;
int origlen;
}
end:
- inpkt->len = origlen;
+ origpkt->len = origlen;
}
/*
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);
- }
+ if(from != myself)
+ send_packet(myself, packet);
for(node = connection_tree->head; node; node = node->next) {
c = node->data;