summaryrefslogtreecommitdiff
path: root/print-macsec.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-05-27 17:13:19 -0700
committerGitHub <noreply@github.com>2020-05-27 17:13:19 -0700
commitfb7dd59f996c8749835ecdf3bcc8612734dcf6d6 (patch)
treefe0e1b8b402332b7c6e16a119343c2060318b257 /print-macsec.c
parent63c261606326ad3ca01f57e006312b41e9857d7c (diff)
downloadtcpdump-fb7dd59f996c8749835ecdf3bcc8612734dcf6d6.tar.gz
More GET_ macros.
Diffstat (limited to 'print-macsec.c')
-rw-r--r--print-macsec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/print-macsec.c b/print-macsec.c
index 1dc5d051..0a95e02c 100644
--- a/print-macsec.c
+++ b/print-macsec.c
@@ -157,7 +157,7 @@ int macsec_print(netdissect_options *ndo, const u_char **bp,
return hdrlen + caplen;
- if (sectag->short_length) {
+ if ((GET_U_1(sectag->short_length) & MACSEC_SL_MASK) != 0 {
int r = snprintf(buf + n, sizeof(buf) - n, ", sl %u",
GET_U_1(sectag->short_length) & MACSEC_SL_MASK);
if (r < 0)
@@ -165,7 +165,7 @@ int macsec_print(netdissect_options *ndo, const u_char **bp,
n += r;
}
- if (sectag->tci_an & MACSEC_TCI_SC) {
+ if (GET_U_1(sectag->tci_an) & MACSEC_TCI_SC) {
uint64_t sci;
int r;
sci = GET_BE_U_8(sectag->secure_channel_id);
@@ -180,7 +180,7 @@ int macsec_print(netdissect_options *ndo, const u_char **bp,
len = ieee8021ae_sectag_len(ndo, sectag);
*length_type = GET_BE_U_2(*bp + len);
- if (ndo->ndo_eflag && *length_type > ETHERMTU && !(sectag->tci_an & MACSEC_TCI_E))
+ if (ndo->ndo_eflag && *length_type > ETHERMTU && !(GET_U_1(sectag->tci_an) & MACSEC_TCI_E))
ND_PRINT((ndo, "ethertype %s, ", tok2str(ethertype_values,"0x%04x", *length_type)));
if ((GET_U_1(sectag->tci_an) & MACSEC_TCI_CONFID)) {