@@ -299,7 +299,6 @@ dhcp6opt_print(netdissect_options *ndo,
299299 uint8_t dh6_reconf_type ;
300300 uint8_t dh6_lq_query_type ;
301301 u_int first_list_value ;
302- uint16_t remainder_len ;
303302
304303 if (cp == ep )
305304 return ;
@@ -786,7 +785,7 @@ dhcp6opt_print(netdissect_options *ndo,
786785 nd_printjnp (ndo , tp , label_len );
787786 tp += label_len ;
788787 remain_len -= (label_len + 1 );
789- if (GET_U_1 (tp )) ND_PRINT ("." );
788+ if (GET_U_1 (tp )) ND_PRINT ("." );
790789 } else {
791790 ND_PRINT (" ?" );
792791 break ;
@@ -819,24 +818,24 @@ dhcp6opt_print(netdissect_options *ndo,
819818 ND_PRINT (" " );
820819 tp = (const u_char * )(dh6o + 1 );
821820 first_list_value = TRUE;
822- remainder_len = optlen ;
823- while (remainder_len >= 2 ) {
821+ remain_len = optlen ;
822+ while (remain_len >= 2 ) {
824823 if (first_list_value == FALSE) {
825824 ND_PRINT ("," );
826825 }
827826 first_list_value = FALSE;
828827 subopt_len = GET_BE_U_2 (tp );
829- if (subopt_len > remainder_len - 2 ) {
828+ if (subopt_len > remain_len - 2 ) {
829+ ND_PRINT (" ?" );
830830 break ;
831831 }
832832 tp += 2 ;
833833 nd_printjn (ndo , tp , subopt_len );
834834 tp += subopt_len ;
835- remainder_len -= (subopt_len + 2 );
835+ remain_len -= (subopt_len + 2 );
836836 }
837- if (remainder_len != 0 ) {
837+ if (remain_len != 0 )
838838 ND_PRINT (" ?" );
839- }
840839 ND_PRINT (")" );
841840 break ;
842841
0 commit comments