From 0dff4409ce68003ae25af5d92e73bdff9c932ed4 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Tue, 6 Aug 2013 21:55:35 +0100 Subject: [PATCH] hunt for rlocs directly, not via eid maps, when unwrapping packets --- pass-1/packet.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; }