Bugfix: avoid sending bogus data over the radio when no prefix is set; bug reported by mathieupouillot
This commit is contained in:
parent
865264a063
commit
39cfd156b2
|
@ -171,16 +171,19 @@ print_local_addresses(void)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
request_prefix(void) {
|
request_prefix(void)
|
||||||
|
{
|
||||||
/* mess up uip_buf with a dirty request... */
|
/* mess up uip_buf with a dirty request... */
|
||||||
uip_buf[0] = '!';
|
uip_buf[0] = '!';
|
||||||
uip_buf[1] = 'P';
|
uip_buf[1] = 'P';
|
||||||
uip_len = 2;
|
uip_len = 2;
|
||||||
slip_send();
|
slip_send();
|
||||||
|
uip_len = 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
set_prefix_64(uip_ipaddr_t *prefix_64) {
|
set_prefix_64(uip_ipaddr_t *prefix_64)
|
||||||
|
{
|
||||||
uip_ipaddr_t ipaddr;
|
uip_ipaddr_t ipaddr;
|
||||||
memcpy(&prefix, prefix_64, 16);
|
memcpy(&prefix, prefix_64, 16);
|
||||||
memcpy(&ipaddr, prefix_64, 16);
|
memcpy(&ipaddr, prefix_64, 16);
|
||||||
|
@ -200,7 +203,6 @@ PROCESS_THREAD(border_router_process, ev, data)
|
||||||
PROCESS_PAUSE();
|
PROCESS_PAUSE();
|
||||||
|
|
||||||
process_start(&webserver_nogui_process, NULL);
|
process_start(&webserver_nogui_process, NULL);
|
||||||
|
|
||||||
SENSORS_ACTIVATE(button_sensor);
|
SENSORS_ACTIVATE(button_sensor);
|
||||||
|
|
||||||
PRINTF("RPL-Border router started\n");
|
PRINTF("RPL-Border router started\n");
|
||||||
|
|
Loading…
Reference in a new issue