File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ u_int
441
441
mfr_print (netdissect_options * ndo ,
442
442
const u_char * p , u_int length )
443
443
{
444
- u_int tlen ,idx , hdr_len = 0 ;
444
+ u_int tlen ,hdr_len = 0 ;
445
445
uint16_t sequence_num ;
446
446
uint8_t ie_type ,ie_len ;
447
447
const uint8_t * tptr ;
@@ -515,12 +515,7 @@ mfr_print(netdissect_options *ndo,
515
515
516
516
case MFR_CTRL_IE_BUNDLE_ID : /* same message format */
517
517
case MFR_CTRL_IE_LINK_ID :
518
- for (idx = 0 ; idx < ie_len && idx < MFR_ID_STRING_MAXLEN ; idx ++ ) {
519
- if (GET_U_1 (tptr + idx ) != 0 ) /* don't print null termination */
520
- fn_print_char (ndo , GET_U_1 (tptr + idx ));
521
- else
522
- break ;
523
- }
518
+ nd_printjnp (ndo , tptr , ND_MIN (ie_len , MFR_ID_STRING_MAXLEN ));
524
519
break ;
525
520
526
521
case MFR_CTRL_IE_TIMESTAMP :
You can’t perform that action at this time.
0 commit comments