diff options
author | Neale Ranns <nranns@cisco.com> | 2019-10-30 17:34:14 +0000 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-11-05 15:34:00 +0000 |
commit | 0b6a857d85df97e887de7aaf00fd6bd2dae39bf8 (patch) | |
tree | 9494d7544d7af1fb5381bfb0aea51f731a661afd /src/vnet/ip/lookup.c | |
parent | 3ea17d54a9a00c81bc672a7be1d48b765ac87ed2 (diff) |
ip: Fragmentation fixes
Type: fix
if the packet is about to be fragmented, then don't call any of the
actions that expect the rewrite to have been written.
1) don't double count packets thru the adjacency (original & fragments)
2) don't double decrement the TTL for fragments
3) return to ip4-midchain post ip-frag if that's where we started.
4) only run midchain/mcast fixups if not fragmenting (if no errors)
Change-Id: Ib2866787a42713ee5871b87b597d8f74b901044b
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ip/lookup.c')
-rw-r--r-- | src/vnet/ip/lookup.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/vnet/ip/lookup.c b/src/vnet/ip/lookup.c index 4db7660eea9..c1fbc429b97 100644 --- a/src/vnet/ip/lookup.c +++ b/src/vnet/ip/lookup.c @@ -258,27 +258,10 @@ format_ip_flow_hash_config (u8 * s, va_list * args) u8 * format_ip_adjacency_packet_data (u8 * s, va_list * args) { - u32 adj_index = va_arg (*args, u32); u8 *packet_data = va_arg (*args, u8 *); u32 n_packet_data_bytes = va_arg (*args, u32); - ip_adjacency_t *adj; - if (!adj_is_valid (adj_index)) - return format (s, "<invalid adjacency>"); - - adj = adj_get (adj_index); - - switch (adj->lookup_next_index) - { - case IP_LOOKUP_NEXT_REWRITE: - case IP_LOOKUP_NEXT_MCAST: - s = - format (s, "%U", format_hex_bytes, packet_data, n_packet_data_bytes); - break; - - default: - break; - } + s = format (s, "%U", format_hex_bytes, packet_data, n_packet_data_bytes); return s; } |