From eef233ceab3b5ed140ce48d10e49c17bbb645bb1 Mon Sep 17 00:00:00 2001 From: Yasuyuki Tanaka Date: Tue, 29 Mar 2016 20:05:28 +0200 Subject: [PATCH] Clear the uIP buffer before calling dao_ack_output() --- core/net/rpl/rpl-icmp6.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/net/rpl/rpl-icmp6.c b/core/net/rpl/rpl-icmp6.c index 02f1d2244..b900c6d5b 100644 --- a/core/net/rpl/rpl-icmp6.c +++ b/core/net/rpl/rpl-icmp6.c @@ -797,10 +797,11 @@ dao_input_storing(void) uip_icmp6_send(rpl_get_parent_ipaddr(dag->preferred_parent), ICMP6_RPL, RPL_CODE_DAO, buffer_length); } - } + } /* independent if we remove or not - ACK the request */ if(flags & RPL_DAO_K_FLAG) { /* indicate that we accepted the no-path DAO */ + uip_clear_buf(); dao_ack_output(instance, &dao_sender_addr, sequence, RPL_DAO_ACK_UNCONDITIONAL_ACCEPT); } @@ -884,9 +885,9 @@ fwd_dao: uip_icmp6_send(rpl_get_parent_ipaddr(dag->preferred_parent), ICMP6_RPL, RPL_CODE_DAO, buffer_length); } - if(should_ack) { PRINTF("RPL: Sending DAO ACK\n"); + uip_clear_buf(); dao_ack_output(instance, &dao_sender_addr, sequence, RPL_DAO_ACK_UNCONDITIONAL_ACCEPT); }