The specification says in a well-formed Magic Number Information Element
the data is exactly 4 bytes long. This gives a more accurate output.
Update the output of a test accordingly.
Partial update from
aa3e54f594385ce7e1e319b0c84999e51192578b
in 4.9 branch.
switch (ie_type) {
case MFR_CTRL_IE_MAGIC_NUM:
+ /* FRF.16.1 Section 3.4.3 Magic Number Information Element */
+ if (ie_len != 4) {
+ ND_PRINT("[IE data length %d != 4]", ie_len);
+ nd_print_invalid(ndo);
+ break;
+ }
ND_PRINT("0x%08x", GET_BE_U_4(tptr));
break;
1 [Error converting time] FRF.16 Control, Flags [Begin, End, Control], Unknown Message (0x00), length 262144
- IE Magic Number (3), length 3: [|mfr]
+ IE Magic Number (3), length 3: [IE data length 1 != 4] (invalid) [|mfr]