Skip to content

Commit fb7dd59

Browse files
authored
More GET_ macros.
1 parent 63c2616 commit fb7dd59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

print-macsec.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ int macsec_print(netdissect_options *ndo, const u_char **bp,
157157
return hdrlen + caplen;
158158

159159

160-
if (sectag->short_length) {
160+
if ((GET_U_1(sectag->short_length) & MACSEC_SL_MASK) != 0 {
161161
int r = snprintf(buf + n, sizeof(buf) - n, ", sl %u",
162162
GET_U_1(sectag->short_length) & MACSEC_SL_MASK);
163163
if (r < 0)
164164
return hdrlen + caplen;
165165
n += r;
166166
}
167167

168-
if (sectag->tci_an & MACSEC_TCI_SC) {
168+
if (GET_U_1(sectag->tci_an) & MACSEC_TCI_SC) {
169169
uint64_t sci;
170170
int r;
171171
sci = GET_BE_U_8(sectag->secure_channel_id);
@@ -180,7 +180,7 @@ int macsec_print(netdissect_options *ndo, const u_char **bp,
180180

181181
len = ieee8021ae_sectag_len(ndo, sectag);
182182
*length_type = GET_BE_U_2(*bp + len);
183-
if (ndo->ndo_eflag && *length_type > ETHERMTU && !(sectag->tci_an & MACSEC_TCI_E))
183+
if (ndo->ndo_eflag && *length_type > ETHERMTU && !(GET_U_1(sectag->tci_an) & MACSEC_TCI_E))
184184
ND_PRINT((ndo, "ethertype %s, ", tok2str(ethertype_values,"0x%04x", *length_type)));
185185

186186
if ((GET_U_1(sectag->tci_an) & MACSEC_TCI_CONFID)) {

0 commit comments

Comments
 (0)