fix initialization of uip_packet and packetstate before calling uip_periodic