X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/fab90c5c95884e6d75618f8b325b6360fb08cdb9..dd5c8e67761d96727d45d72daf3b2f2f93bd075c:/print-bootp.c diff --git a/print-bootp.c b/print-bootp.c index ce34d13d..f84b77ca 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -295,7 +295,7 @@ bootp_print(netdissect_options *ndo, bp_htype = GET_U_1(bp->bp_htype); bp_hlen = GET_U_1(bp->bp_hlen); - if (bp_htype == 1 && bp_hlen == 6 && bp_op == BOOTPREQUEST) { + if (bp_htype == 1 && bp_hlen == MAC_ADDR_LEN && bp_op == BOOTPREQUEST) { ND_PRINT(" from %s", GET_ETHERADDR_STRING(bp->bp_chaddr)); } @@ -311,7 +311,7 @@ bootp_print(netdissect_options *ndo, ND_PRINT(", htype %u", bp_htype); /* The usual length for 10Mb Ethernet address is 6 bytes */ - if (bp_htype != 1 || bp_hlen != 6) + if (bp_htype != 1 || bp_hlen != MAC_ADDR_LEN) ND_PRINT(", hlen %u", bp_hlen); /* Only print interesting fields */ @@ -344,7 +344,7 @@ bootp_print(netdissect_options *ndo, ND_PRINT("\n\t Gateway-IP %s", GET_IPADDR_STRING(bp->bp_giaddr)); /* Client's Ethernet address */ - if (bp_htype == 1 && bp_hlen == 6) { + if (bp_htype == 1 && bp_hlen == MAC_ADDR_LEN) { ND_PRINT("\n\t Client-Ethernet-Address %s", GET_ETHERADDR_STRING(bp->bp_chaddr)); }