From 42b3f7ce134c8d6b3df256ae4f7af50c56d91bc3 Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Sun, 24 Apr 2011 16:32:09 +0000 Subject: [PATCH] Send packets with destination network number set to that of the network card when 00:00:00:00 is used. --- src/winsock.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/winsock.c b/src/winsock.c index a6624a7..413b236 100644 --- a/src/winsock.c +++ b/src/winsock.c @@ -649,6 +649,12 @@ int WSAAPI sendto(SOCKET fd, const char *buf, int len, int flags, const struct s memcpy(packet->dest_node, ipxaddr->sa_nodenum, 6); packet->dest_socket = ipxaddr->sa_socket; + unsigned char z6[] = {0,0,0,0,0,0}; + + if(memcmp(packet->dest_net, z6, 4) == 0) { + memcpy(packet->dest_net, sockptr->netnum, 4); + } + memcpy(packet->src_net, sockptr->netnum, 4); memcpy(packet->src_node, sockptr->nodenum, 6); packet->src_socket = sockptr->socket;