@@ -855,7 +855,7 @@ ext_hdr_options_process(void)
855855 case UIP_EXT_HDR_OPT_RPL :
856856 PRINTF ("Processing RPL option\n" );
857857 if (rpl_verify_header (uip_ext_opt_offset )) {
858- PRINTF ("RPL Option Error : Dropping Packet" );
858+ PRINTF ("RPL Option Error: Dropping Packet\n " );
859859 return 1 ;
860860 }
861861 uip_ext_opt_offset += (UIP_EXT_HDR_OPT_RPL_BUF -> opt_len ) + 2 ;
@@ -1123,17 +1123,19 @@ uip_process(uint8_t flag)
11231123 if (* uip_next_hdr == UIP_PROTO_HBHO ) {
11241124#if UIP_CONF_IPV6_CHECKS
11251125 uip_ext_bitmap |= UIP_EXT_HDR_BITMAP_HBHO ;
1126- #endif /*UIP_CONF_IPV6_CHECKS*/
1126+ #endif /* UIP_CONF_IPV6_CHECKS */
11271127 switch (ext_hdr_options_process ()) {
11281128 case 0 :
1129- /*continue*/
1129+ /* continue */
11301130 uip_next_hdr = & UIP_EXT_BUF -> next ;
11311131 uip_ext_len += (UIP_EXT_BUF -> len << 3 ) + 8 ;
11321132 break ;
11331133 case 1 :
1134- /*silently discard*/
1134+ PRINTF ("Dropping packet after extension header processing\n" );
1135+ /* silently discard */
11351136 goto drop ;
11361137 case 2 :
1138+ PRINTF ("Sending error message after extension header processing\n" );
11371139 /* send icmp error message (created in ext_hdr_options_process)
11381140 * and discard*/
11391141 goto send ;
@@ -1448,6 +1450,11 @@ uip_process(uint8_t flag)
14481450#if UIP_UDP_CHECKSUMS
14491451 uip_len = uip_len - UIP_IPUDPH_LEN ;
14501452 uip_appdata = & uip_buf [UIP_IPUDPH_LEN + UIP_LLH_LEN ];
1453+ /* XXX hack: UDP/IPv6 receivers should drop packets with UDP
1454+ checksum 0. Here, we explicitly receive UDP packets with checksum
1455+ 0. This is to be able to debug code that for one reason or
1456+ another miscomputes UDP checksums. The reception of zero UDP
1457+ checksums should be turned into a configration option. */
14511458 if (UIP_UDP_BUF -> udpchksum != 0 && uip_udpchksum () != 0xffff ) {
14521459 UIP_STAT (++ uip_stat .udp .drop );
14531460 UIP_STAT (++ uip_stat .udp .chkerr );
@@ -2211,19 +2218,18 @@ uip_process(uint8_t flag)
22112218 UIP_TCP_BUF -> seqno [3 ] = uip_connr -> snd_nxt [3 ];
22122219
22132220 UIP_IP_BUF -> proto = UIP_PROTO_TCP ;
2214-
2221+
22152222 UIP_TCP_BUF -> srcport = uip_connr -> lport ;
22162223 UIP_TCP_BUF -> destport = uip_connr -> rport ;
22172224
2218-
22192225 uip_ipaddr_copy (& UIP_IP_BUF -> destipaddr , & uip_connr -> ripaddr );
2220- uip_ds6_select_src (& UIP_IP_BUF -> srcipaddr ,& UIP_IP_BUF -> destipaddr );
2221- PRINTF ("Sending TCP packet to" );
2226+ uip_ds6_select_src (& UIP_IP_BUF -> srcipaddr , & UIP_IP_BUF -> destipaddr );
2227+ PRINTF ("Sending TCP packet to " );
22222228 PRINT6ADDR (& UIP_IP_BUF -> destipaddr );
2223- PRINTF ("from" );
2229+ PRINTF (" from " );
22242230 PRINT6ADDR (& UIP_IP_BUF -> srcipaddr );
22252231 PRINTF ("\n" );
2226-
2232+
22272233 if (uip_connr -> tcpstateflags & UIP_STOPPED ) {
22282234 /* If the connection has issued uip_stop(), we advertise a zero
22292235 window so that the remote host will stop sending data. */
0 commit comments