1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00

Send packets with destination network number set to that of the network card when 00:00:00:00 is used.

This commit is contained in:
Daniel Collins 2011-04-24 16:32:09 +00:00
parent 62b2fada8f
commit 42b3f7ce13

View File

@ -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;