UDP packets are being sent twice because of udp_slen doesn't reset to zero. After line 1168 of uip.c must be added: uip_slen = 0; (just before "goto ip_send_nolen;" in code labeled udp_send)