diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-05-28 18:19:36 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-05-28 18:19:36 -0700 |
commit | f5f7f4a343bb54cee09ac707f59dd24eb24f89fd (patch) | |
tree | 018c7d4e4fae0f005739b2d0f8e38b8767890692 /print-802_15_4.c | |
parent | fe209f3b17b2dbe0c1d81c3787744cb9c7517582 (diff) | |
download | tcpdump-f5f7f4a343bb54cee09ac707f59dd24eb24f89fd.tar.gz |
Handle the reserved value for the addressing modes.
Report an error if the source or destination addressing mode has the
reserved value. Also, squelch a warning.
Diffstat (limited to 'print-802_15_4.c')
-rw-r--r-- | print-802_15_4.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/print-802_15_4.c b/print-802_15_4.c index ca7c9dbf..2016552c 100644 --- a/print-802_15_4.c +++ b/print-802_15_4.c @@ -124,12 +124,15 @@ ieee802_15_4_if_print(struct netdissect_options *ndo, p+= hdrlen; caplen -= hdrlen; } else { - u_int16_t panid; + u_int16_t panid = 0; switch ((fc >> 10) & 0x3) { case 0x00: ND_PRINT((ndo,"none ")); break; + case 0x01: + ND_PRINT((ndo,"reserved destination addressing mode")); + return 0; case 0x02: panid = EXTRACT_LE_16BITS(p); p += 2; @@ -149,6 +152,9 @@ ieee802_15_4_if_print(struct netdissect_options *ndo, case 0x00: ND_PRINT((ndo,"none ")); break; + case 0x01: + ND_PRINT((ndo,"reserved source addressing mode")); + return 0; case 0x02: if (!(fc & (1 << 6))) { panid = EXTRACT_LE_16BITS(p); |