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

Fix testing of source address in UDP-encapsulated unicast packets.

This commit is contained in:
Daniel Collins 2014-04-20 16:31:11 +01:00
parent 79d41c0001
commit ecda2ba0a4
2 changed files with 3 additions and 2 deletions

View File

@ -304,7 +304,7 @@ ipx_interface_t *copy_ipx_interface(const ipx_interface_t *src)
*dest = *src;
dest->ipaddr = NULL;
dest->prev = NULL;
dest->prev = dest;
dest->next = NULL;
ipx_interface_ip_t *ip;

View File

@ -401,7 +401,7 @@ static void _handle_udp_recv(ipx_packet *packet, size_t packet_size, struct sock
}
else{
allow_interfaces = ipx_interface_by_addr(
addr32_in(packet->dest_net), addr32_in(packet->dest_node));
addr32_in(packet->dest_net), addr48_in(packet->dest_node));
}
ipx_interface_t *i;
@ -421,6 +421,7 @@ static void _handle_udp_recv(ipx_packet *packet, size_t packet_size, struct sock
if(!source_ok)
{
log_printf(LOG_DEBUG, "Packet did not come from an expected subnet, dropping");
return;
}