diff options
author | Dmitry Valter <d-valter@yandex-team.ru> | 2022-09-16 12:33:25 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2022-09-27 14:25:05 +0000 |
commit | d9252468792d52373b7cab1b66eda5fe279f7cb5 (patch) | |
tree | c82492e6fbe2bf4aee0a528e5e21d9eab974c614 /src/vnet/ip/ip.api | |
parent | 522a5b33321ea198fe73f3180a692c316c63575f (diff) |
vnet: fix ip4 version and IHL check
Validate version and IHL regardless of present options.
Originally VPP would accept seriously damaged headers in case IHL != 5.
Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Change-Id: Ifd59622efa63dfad7f6e4858dec40ccac3274574
Diffstat (limited to 'src/vnet/ip/ip.api')
-rw-r--r-- | src/vnet/ip/ip.api | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/ip/ip.api b/src/vnet/ip/ip.api index 23e094b48a0..8a6ecc8da2f 100644 --- a/src/vnet/ip/ip.api +++ b/src/vnet/ip/ip.api @@ -1020,6 +1020,12 @@ counters ip4 { units "packets"; description "ip4 ttl <= 1"; }; + hdr_too_short { + severity error; + type counter64; + units "packets"; + description "ip4 IHL < 5"; + }; /* Errors signalled by ip4-rewrite. */ mtu_exceeded { |