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
441441mfr_print (netdissect_options * ndo ,
442442 const u_char * p , u_int length )
443443{
444- u_int tlen ,idx , hdr_len = 0 ;
444+ u_int tlen ,hdr_len = 0 ;
445445 uint16_t sequence_num ;
446446 uint8_t ie_type ,ie_len ;
447447 const uint8_t * tptr ;
@@ -515,12 +515,7 @@ mfr_print(netdissect_options *ndo,
515515
516516 case MFR_CTRL_IE_BUNDLE_ID : /* same message format */
517517 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 ));
524519 break ;
525520
526521 case MFR_CTRL_IE_TIMESTAMP :
You can’t perform that action at this time.
0 commit comments