mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #2255 from Lotterleben/aodvv2_fix_packethandler
aodv: call aodv_packet_reader_handle_packet() when received packet is *not* our own
This commit is contained in:
commit
f6ffbd6830
@ -294,9 +294,11 @@ static void *_aodv_receiver_thread(void *arg)
|
|||||||
struct netaddr _sender;
|
struct netaddr _sender;
|
||||||
ipv6_addr_t_to_netaddr(&sa_rcv.sin6_addr, &_sender);
|
ipv6_addr_t_to_netaddr(&sa_rcv.sin6_addr, &_sender);
|
||||||
|
|
||||||
/* For some reason we sometimes get passed our own packets. drop them. */
|
/* We sometimes get passed our own packets. Drop them. */
|
||||||
if (netaddr_cmp(&_sender, &na_local) == 0) {
|
if (netaddr_cmp(&_sender, &na_local) == 0) {
|
||||||
AODV_DEBUG("received our own packet, dropping it.\n");
|
AODV_DEBUG("received our own packet, dropping it.\n");
|
||||||
|
}
|
||||||
|
else {
|
||||||
aodv_packet_reader_handle_packet((void *) buf_rcv, rcv_size, &_sender);
|
aodv_packet_reader_handle_packet((void *) buf_rcv, rcv_size, &_sender);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -354,9 +356,9 @@ ipv6_addr_t *aodv_get_next_hop(ipv6_addr_t *dest)
|
|||||||
DEBUG("[aodvv2][ndp] found NC entry. Returning dest addr.\n");
|
DEBUG("[aodvv2][ndp] found NC entry. Returning dest addr.\n");
|
||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG("\t[ndp] no entry for addr %s found\n",
|
DEBUG("\t[ndp] no entry for addr %s found\n",
|
||||||
ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN, dest));
|
ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN, dest));
|
||||||
|
|
||||||
if (rt_entry) {
|
if (rt_entry) {
|
||||||
/* Case 1: Undeliverable Packet */
|
/* Case 1: Undeliverable Packet */
|
||||||
int packet_indeliverable = rt_entry->state == ROUTE_STATE_BROKEN ||
|
int packet_indeliverable = rt_entry->state == ROUTE_STATE_BROKEN ||
|
||||||
|
Loading…
Reference in New Issue
Block a user