@@ -299,7 +299,6 @@ dhcp6opt_print(netdissect_options *ndo,
299
299
uint8_t dh6_reconf_type ;
300
300
uint8_t dh6_lq_query_type ;
301
301
u_int first_list_value ;
302
- uint16_t remainder_len ;
303
302
304
303
if (cp == ep )
305
304
return ;
@@ -786,7 +785,7 @@ dhcp6opt_print(netdissect_options *ndo,
786
785
nd_printjnp (ndo , tp , label_len );
787
786
tp += label_len ;
788
787
remain_len -= (label_len + 1 );
789
- if (GET_U_1 (tp )) ND_PRINT ("." );
788
+ if (GET_U_1 (tp )) ND_PRINT ("." );
790
789
} else {
791
790
ND_PRINT (" ?" );
792
791
break ;
@@ -819,24 +818,24 @@ dhcp6opt_print(netdissect_options *ndo,
819
818
ND_PRINT (" " );
820
819
tp = (const u_char * )(dh6o + 1 );
821
820
first_list_value = TRUE;
822
- remainder_len = optlen ;
823
- while (remainder_len >= 2 ) {
821
+ remain_len = optlen ;
822
+ while (remain_len >= 2 ) {
824
823
if (first_list_value == FALSE) {
825
824
ND_PRINT ("," );
826
825
}
827
826
first_list_value = FALSE;
828
827
subopt_len = GET_BE_U_2 (tp );
829
- if (subopt_len > remainder_len - 2 ) {
828
+ if (subopt_len > remain_len - 2 ) {
829
+ ND_PRINT (" ?" );
830
830
break ;
831
831
}
832
832
tp += 2 ;
833
833
nd_printjn (ndo , tp , subopt_len );
834
834
tp += subopt_len ;
835
- remainder_len -= (subopt_len + 2 );
835
+ remain_len -= (subopt_len + 2 );
836
836
}
837
- if (remainder_len != 0 ) {
837
+ if (remain_len != 0 )
838
838
ND_PRINT (" ?" );
839
- }
840
839
ND_PRINT (")" );
841
840
break ;
842
841
0 commit comments