From 3537d06cc8284c99a81ac7667b87d87b6c46aa71 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 15 Jul 2017 09:25:41 +0200 Subject: [PATCH] RPL log fixes --- os/net/rpl-lite/rpl-dag.c | 8 +++++--- os/net/rpl-lite/rpl.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/os/net/rpl-lite/rpl-dag.c b/os/net/rpl-lite/rpl-dag.c index 99b721b74..bf084acb7 100644 --- a/os/net/rpl-lite/rpl-dag.c +++ b/os/net/rpl-lite/rpl-dag.c @@ -452,7 +452,7 @@ init_dag(uint8_t instance_id, uip_ipaddr_t *dag_id, rpl_ocp_t ocp, /* Prefix */ if(!rpl_set_prefix_from_addr(prefix, prefix_len, prefix_flags)) { - LOG_ERR("failed to set prefix"); + LOG_ERR("failed to set prefix\n"); return 0; } @@ -532,7 +532,9 @@ process_dio_init_dag(uip_ipaddr_t *from, rpl_dio_t *dio) LOG_INFO("initialized DAG with instance ID %u, DAG ID ", curr_instance.instance_id); LOG_INFO_6ADDR(&curr_instance.dag.dag_id); - LOG_INFO_(", rank %u\n", curr_instance.dag.rank); + LOG_INFO_(", prexix "); + LOG_INFO_6ADDR(&dio->prefix_info.prefix); + LOG_INFO_("/%u, rank %u\n", dio->prefix_info.length, curr_instance.dag.rank); LOG_ANNOTATE("#A init=%u\n", curr_instance.dag.dag_id.u8[sizeof(curr_instance.dag.dag_id) - 1]); @@ -548,7 +550,7 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio) if(!curr_instance.used && !rpl_dag_root_is_root()) { /* Attempt to init our DAG from this DIO */ if(!process_dio_init_dag(from, dio)) { - LOG_WARN("failed to init DAG"); + LOG_WARN("failed to init DAG\n"); return; } } diff --git a/os/net/rpl-lite/rpl.c b/os/net/rpl-lite/rpl.c index aefa8bc0c..e698ca990 100644 --- a/os/net/rpl-lite/rpl.c +++ b/os/net/rpl-lite/rpl.c @@ -137,7 +137,7 @@ rpl_set_prefix_from_addr(uip_ipaddr_t *addr, unsigned len, uint8_t flags) uip_ipaddr_t ipaddr; if(addr == NULL || len == 0 || len > 128 || !(flags & UIP_ND6_RA_FLAG_AUTONOMOUS)) { - LOG_WARN("not-supported or invalid prefix\n"); + LOG_WARN("prefix not included, not-supported or invalid\n"); return 0; }