diff options
author | Marian Chereji <marian.chereji@freescale.com> | 2013-08-27 14:35:28 (GMT) |
---|---|---|
committer | Rivera Jose-B46482 <German.Rivera@freescale.com> | 2013-08-29 14:05:13 (GMT) |
commit | 929fcea7a3b5fc0a5a03720655fdb6cd40d69d92 (patch) | |
tree | 42c4a8514f72917d4cf261aaac4e0ca9e12683b6 | |
parent | 2b4c43eb8a35cf889c12b3ee13e7954385b273cf (diff) | |
download | linux-fsl-qoriq-929fcea7a3b5fc0a5a03720655fdb6cd40d69d92.tar.xz |
dpa_offload: Reduce the size of the IPv4 header options field
According to RFC 791, the size of the IPv4 header (options
included) is represented on 4 bits (IHL), hence it can be an
absolute maximum of 15 * 4 = 60 bytes. The IPv4 options buffer
size field in the fsl_dpa_offload.h header file, in the
ipv4_header data structure, was declared as an "unsigned int" and
this was causing a static analysis warning in dpa_classifier.
The field was reduced to uint8_t which is more than enough to
store the size of the IPv4 frame options.
Signed-off-by: Marian Chereji <marian.chereji@freescale.com>
Change-Id: I69fb1307329b68da652ed85d659aa10e34c5af67
Reviewed-on: http://git.am.freescale.net:8181/4264
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com>
Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
-rw-r--r-- | include/linux/fsl_dpa_offload.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fsl_dpa_offload.h b/include/linux/fsl_dpa_offload.h index c85c4c6..b5f4e6e 100644 --- a/include/linux/fsl_dpa_offload.h +++ b/include/linux/fsl_dpa_offload.h @@ -162,7 +162,7 @@ struct ipv4_header { uint8_t *options; /* Size of IPv4 options buffer. Zero for no options. */ - unsigned int options_size; + uint8_t options_size; }; /* Description of the VLAN header */ |