diff --git a/pass-1/packet.c b/pass-1/packet.c index 3d3f304..05205f1 100644 --- a/pass-1/packet.c +++ b/pass-1/packet.c @@ -167,10 +167,9 @@ int unwrap_ipv4_packet(struct rlocs* reg, struct recv_pkt* pkt, struct rsp_data* struct rloc* rloc; struct in_addr tmp; - // TODO: check endianness of saddr/daddr tmp.s_addr = pkt->hdr.ip.daddr; - if ( ( rloc = rloc_find_for_ipv4( reg, &tmp ) ) == NULL ) { - warn( "Couldn't find destination rloc, dropping packet" ); + if ( ( rloc = rloc_find_by_address( reg, &tmp, NULL ) ) == NULL ) { + warn( "Couldn't find rloc from destination IP, dropping packet" ); // TODO: we should be able to specify we need it to have a private key return 0; }