From e2d0cbae8b8cdab0d459f0617c411c370ceed0d3 Mon Sep 17 00:00:00 2001 From: Katerina Barone-Adesi Date: Tue, 30 Aug 2016 11:17:35 +0200 Subject: [PATCH 1/2] Got rid of packet.clone_to_memory --- src/apps/lwaftr/fragmentv4_hardened.lua | 45 +++++++++++-------- src/apps/lwaftr/fragmentv6_hardened.lua | 39 +++++++++------- src/core/packet.lua | 16 +++---- .../tests/data/counters/arp-for-next-hop.lua | 4 +- ...pv4-in-binding-big-packet-df-set-allow.lua | 4 +- ...ipv4-in-binding-big-packet-df-set-drop.lua | 4 +- .../data/counters/from-to-b4-ipv6-hairpin.lua | 4 +- ...4-tunneled-icmpv4-ping-hairpin-unbound.lua | 4 +- ...rom-to-b4-tunneled-icmpv4-ping-hairpin.lua | 4 +- .../data/counters/icmpv6-ping-and-reply.lua | 4 +- ...1p-ipv4-infrags-out-1p-ipv6-6-outfrags.lua | 4 +- .../data/counters/in-1p-ipv4-out-0p-drop.lua | 4 +- .../counters/in-1p-ipv4-out-1p-icmpv4.lua | 4 +- .../counters/in-1p-ipv4-out-1p-ipv6-1.lua | 4 +- .../counters/in-1p-ipv4-out-1p-ipv6-2.lua | 4 +- .../counters/in-1p-ipv4-out-1p-ipv6-3.lua | 4 +- .../counters/in-1p-ipv4-out-1p-ipv6-4.lua | 4 +- .../in-1p-ipv4-out-1p-ipv6-6-outfrags.lua | 4 +- .../counters/in-1p-ipv4-out-1p-ipv6-6.lua | 4 +- .../counters/in-1p-ipv4-out-1p-ipv6-7.lua | 4 +- .../counters/in-1p-ipv4-out-1p-ipv6-8.lua | 4 +- .../counters/in-1p-ipv4-out-1p-ipv6-echo.lua | 4 +- .../data/counters/in-1p-ipv4-out-none-1.lua | 4 +- .../data/counters/in-1p-ipv4-out-none-2.lua | 4 +- .../data/counters/in-1p-ipv4-out-none-3.lua | 4 +- .../data/counters/in-1p-ipv4-out-none-4.lua | 4 +- .../data/counters/in-1p-ipv6-out-0p-ipv4.lua | 4 +- .../counters/in-1p-ipv6-out-1p-icmpv4-1.lua | 4 +- .../counters/in-1p-ipv6-out-1p-icmpv6-1.lua | 4 +- .../counters/in-1p-ipv6-out-1p-icmpv6-2.lua | 4 +- .../counters/in-1p-ipv6-out-1p-ipv4-1.lua | 4 +- .../counters/in-1p-ipv6-out-1p-ipv4-2.lua | 4 +- .../counters/in-1p-ipv6-out-1p-ipv4-3.lua | 4 +- .../in-1p-ipv6-out-1p-ipv4-4-and-echo.lua | 4 +- .../counters/in-1p-ipv6-out-1p-ipv4-4.lua | 4 +- .../in-1p-ipv6-out-1p-ipv4-5-frags.lua | 4 +- .../counters/in-1p-ipv6-out-1p-ipv4-5.lua | 4 +- .../in-1p-ipv6-out-1p-ipv4-hoplimhair.lua | 4 +- .../data/counters/in-1p-ipv6-out-none-1.lua | 4 +- .../data/counters/in-1p-ipv6-out-none-2.lua | 4 +- ...v4-ipv6-out-icmpv4-ipv6-hairpin-1-drop.lua | 4 +- ...in-ipv4-ipv6-out-icmpv4-ipv6-hairpin-1.lua | 4 +- .../ndp-no-na-next-hop6-mac-not-set-2pkts.lua | 4 +- .../ndp-no-na-next-hop6-mac-not-set-3pkts.lua | 4 +- .../data/counters/ndp-ns-for-next-hop.lua | 4 +- .../tests/data/counters/nofrag4-arp.lua | 4 +- .../tests/data/counters/nofrag4-ping.lua | 4 +- .../data/counters/nofrag6-filterdrop.lua | 4 +- .../tests/data/counters/nofrag6-ns-badip.lua | 4 +- .../tests/data/counters/nofrag6-sol.lua | 4 +- .../non-ipv4-traffic-to-ipv4-interface.lua | 4 +- .../non-ipv6-traffic-to-ipv6-interface.lua | 4 +- .../data/counters/tcp-frominet-bound-ttl1.lua | 4 +- 53 files changed, 155 insertions(+), 145 deletions(-) diff --git a/src/apps/lwaftr/fragmentv4_hardened.lua b/src/apps/lwaftr/fragmentv4_hardened.lua index 92f62c90aa..fc6a28e370 100644 --- a/src/apps/lwaftr/fragmentv4_hardened.lua +++ b/src/apps/lwaftr/fragmentv4_hardened.lua @@ -131,7 +131,7 @@ local function reassembly_status(reassembly_buf) if reassembly_buf.final_start == 0 then return FRAGMENT_MISSING end - if reassembly_buf.running_length ~= reassembly_buf.reassembly_packet.length then + if reassembly_buf.running_length ~= reassembly_buf.reassembly_length then return FRAGMENT_MISSING end if not verify_valid_offsets(reassembly_buf) then @@ -149,9 +149,15 @@ local function fix_pkt_checksum(pkt) htons(ipsum(pkt.data + ehs, ihl, 0))) end +local function pseudo_clone(data, len) + local p = packet.allocate() + p.headroom = 0 + packet.append(p, data, len) + return p +end + local function attempt_reassembly(frags_table, reassembly_buf, fragment) local ihl = get_ihl_from_offset(fragment, ehs) - local reassembly_pkt = reassembly_buf.reassembly_packet local frag_id = get_frag_id(fragment) if frag_id ~= reassembly_buf.fragment_id then -- unreachable error("Impossible case reached in v4 reassembly") --REASSEMBLY_INVALID @@ -187,25 +193,29 @@ local function attempt_reassembly(frags_table, reassembly_buf, fragment) -- Specifically, it requires this file to know the details of struct packet. local skip_headers = reassembly_buf.reassembly_base local dst_offset = skip_headers + frag_start - local last_ok = packet_payload_size - reassembly_pkt.headroom + local last_ok = packet_payload_size if dst_offset + frag_size > last_ok then -- Prevent a buffer overflow. The relevant RFC allows hosts to silently discard -- reassemblies above a certain rather small size, smaller than this. return REASSEMBLY_INVALID end - ffi.copy(reassembly_pkt.data + dst_offset, + local reassembly_data = reassembly_buf.reassembly_data + ffi.copy(reassembly_data + dst_offset, fragment.data + skip_headers, frag_size) local max_data_offset = skip_headers + frag_start + frag_size - reassembly_pkt.length = math.max(reassembly_pkt.length, max_data_offset) + reassembly_buf.reassembly_length = math.max(reassembly_buf.reassembly_length, + max_data_offset) reassembly_buf.running_length = reassembly_buf.running_length + frag_size local restatus = reassembly_status(reassembly_buf) if restatus == REASSEMBLY_OK then + local pkt_len = htons(reassembly_buf.reassembly_length - ehs) local o_len = ehs + o_ipv4_total_length - wr16(reassembly_pkt.data + o_len, htons(reassembly_pkt.length - ehs)) - fix_pkt_checksum(reassembly_pkt) - local reassembled_packet = packet.clone(reassembly_buf.reassembly_packet) + wr16(reassembly_data + o_len, pkt_len) + local reassembled_packet = pseudo_clone(reassembly_buf.reassembly_data, + reassembly_buf.reassembly_length) + fix_pkt_checksum(reassembled_packet) free_reassembly_buf_and_pkt(fragment, frags_table) return REASSEMBLY_OK, reassembled_packet else @@ -221,13 +231,11 @@ local function packet_to_reassembly_buffer(pkt) reassembly_buf.fragment_id = get_frag_id(pkt) reassembly_buf.reassembly_base = ehs + ihl - local tmplen = pkt.length - pkt.length = ehs + ihl - local repkt = reassembly_buf.reassembly_packet - packet.clone_to_memory(repkt, pkt) - wr32(repkt.data + ehs + o_ipv4_identification, 0) -- Clear fragmentation data - reassembly_buf.running_length = pkt.length - pkt.length = tmplen + local headers_len = ehs + ihl + local re_data = reassembly_buf.reassembly_data + ffi.copy(re_data, pkt.data, headers_len) + wr32(re_data + ehs + o_ipv4_identification, 0) -- Clear fragmentation data + reassembly_buf.running_length = headers_len return reassembly_buf end @@ -256,10 +264,11 @@ function initialize_frag_table(max_fragmented_packets, max_pkt_frag) uint16_t final_start; uint16_t reassembly_base; uint16_t fragment_id; - uint32_t running_length; - struct packet reassembly_packet; + uint32_t running_length; // bytes copied so far + uint16_t reassembly_length; // analog to packet.length + uint8_t reassembly_data[$]; } __attribute((packed))]], - max_frags_per_packet, max_frags_per_packet) + max_frags_per_packet, max_frags_per_packet, packet.max_payload) scratch_rbuf = ipv4_reassembly_buffer_t() local max_occupy = 0.9 diff --git a/src/apps/lwaftr/fragmentv6_hardened.lua b/src/apps/lwaftr/fragmentv6_hardened.lua index faf6301c89..e0240cbd6a 100644 --- a/src/apps/lwaftr/fragmentv6_hardened.lua +++ b/src/apps/lwaftr/fragmentv6_hardened.lua @@ -136,7 +136,7 @@ local function reassembly_status(reassembly_buf) if reassembly_buf.final_start == 0 then return FRAGMENT_MISSING end - if reassembly_buf.running_length ~= reassembly_buf.reassembly_packet.length then + if reassembly_buf.running_length ~= reassembly_buf.reassembly_length then return FRAGMENT_MISSING end if not verify_valid_offsets(reassembly_buf) then @@ -145,8 +145,14 @@ local function reassembly_status(reassembly_buf) return REASSEMBLY_OK end +local function pseudo_clone(data, len) + local p = packet.allocate() + p.headroom = 0 + packet.append(p, data, len) + return p +end + local function attempt_reassembly(frags_table, reassembly_buf, fragment) - local reassembly_pkt = reassembly_buf.reassembly_packet local frag_id = get_frag_id(fragment) if frag_id ~= reassembly_buf.fragment_id then -- unreachable error("Impossible case reached in v6 reassembly") --REASSEMBLY_INVALID @@ -182,22 +188,24 @@ local function attempt_reassembly(frags_table, reassembly_buf, fragment) -- Specifically, it requires this file to know the details of struct packet. local skip_headers = reassembly_buf.reassembly_base local dst_offset = skip_headers + frag_start - local last_ok = packet_payload_size - reassembly_pkt.headroom + local last_ok = packet_payload_size if dst_offset + frag_size > last_ok then -- Prevent a buffer overflow. The relevant RFC allows hosts to silently discard -- reassemblies above a certain rather small size, smaller than this. return REASSEMBLY_INVALID end - ffi.copy(reassembly_pkt.data + dst_offset, + ffi.copy(reassembly_buf.reassembly_data + dst_offset, fragment.data + skip_headers + ipv6_frag_header_size, frag_size) local max_data_offset = skip_headers + frag_start + frag_size - reassembly_pkt.length = math.max(reassembly_pkt.length, max_data_offset) + reassembly_buf.reassembly_length = math.max(reassembly_buf.reassembly_length, + max_data_offset) reassembly_buf.running_length = reassembly_buf.running_length + frag_size local restatus = reassembly_status(reassembly_buf) if restatus == REASSEMBLY_OK then - local reassembled_packet = packet.clone(reassembly_buf.reassembly_packet) + local reassembled_packet = pseudo_clone(reassembly_buf.reassembly_data, + reassembly_buf.reassembly_length) free_reassembly_buf_and_pkt(fragment, frags_table) return REASSEMBLY_OK, reassembled_packet else @@ -212,17 +220,15 @@ local function packet_to_reassembly_buffer(pkt) reassembly_buf.fragment_id = get_frag_id(pkt) reassembly_buf.reassembly_base = ehs + ipv6_fixed_header_size - local tmplen = pkt.length - pkt.length = ehs + ipv6_fixed_header_size - local repkt = reassembly_buf.reassembly_packet - packet.clone_to_memory(repkt, pkt) - reassembly_buf.running_length = pkt.length + local reassembly_data = reassembly_buf.reassembly_data + local headers_len = ehs + ipv6_fixed_header_size + ffi.copy(reassembly_data, pkt.data, headers_len) + reassembly_buf.running_length = headers_len - pkt.length = tmplen --Take the next header information from the fragment local next_header_base_offset = ehs + o_ipv6_next_header local next_header_frag_offset = ehs + ipv6_fixed_header_size -- +0 - repkt.data[next_header_base_offset] = pkt.data[next_header_frag_offset] + reassembly_data[next_header_base_offset] = pkt.data[next_header_frag_offset] return reassembly_buf end @@ -250,10 +256,11 @@ function initialize_frag_table(max_fragmented_packets, max_pkt_frag, memuse_coun uint16_t final_start; uint16_t reassembly_base; uint32_t fragment_id; - uint32_t running_length; - struct packet reassembly_packet; + uint32_t running_length; // bytes copied so far + uint16_t reassembly_length; // analog to packet.length + uint8_t reassembly_data[$]; } __attribute((packed))]], - max_frags_per_packet, max_frags_per_packet) + max_frags_per_packet, max_frags_per_packet, packet.max_payload) scratch_rbuf = ipv6_reassembly_buffer_t() local max_occupy = 0.9 diff --git a/src/core/packet.lua b/src/core/packet.lua index 54c0b5cbdd..a3dd8b5dad 100644 --- a/src/core/packet.lua +++ b/src/core/packet.lua @@ -76,25 +76,19 @@ function new_packet () return p end --- Clone srcp into pre-allocated memory for dstp, in a way compatible --- with the current definition of struct packet. -function clone_to_memory(dstp, srcp) - dstp.length = srcp.length - dstp.headroom = srcp.headroom - dstp.data = dstp.data_ + dstp.headroom - ffi.copy(dstp.data, srcp.data, srcp.length) -end - -- Create an exact copy of a packet. function clone (p) local p2 = allocate() - clone_to_memory(p2, p) + p2.length = p.length + p2.headroom = p.headroom + p2.data = p2.data_ + p2.headroom + ffi.copy(p2.data, p.data, p.length) return p2 end -- Append data to the end of a packet. function append (p, ptr, len) - assert(p.length + len <= max_payload, "packet payload overflow") + assert(p.length + len + p.headroom <= max_payload, "packet payload overflow") ffi.copy(p.data + p.length, ptr, len) p.length = p.length + len return p diff --git a/src/program/lwaftr/tests/data/counters/arp-for-next-hop.lua b/src/program/lwaftr/tests/data/counters/arp-for-next-hop.lua index 35ff210f10..9742590d1b 100644 --- a/src/program/lwaftr/tests/data/counters/arp-for-next-hop.lua +++ b/src/program/lwaftr/tests/data/counters/arp-for-next-hop.lua @@ -1,6 +1,6 @@ return { - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 42, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/from-inet-ipv4-in-binding-big-packet-df-set-allow.lua b/src/program/lwaftr/tests/data/counters/from-inet-ipv4-in-binding-big-packet-df-set-allow.lua index 99637924e5..6f5761c00b 100644 --- a/src/program/lwaftr/tests/data/counters/from-inet-ipv4-in-binding-big-packet-df-set-allow.lua +++ b/src/program/lwaftr/tests/data/counters/from-inet-ipv4-in-binding-big-packet-df-set-allow.lua @@ -6,8 +6,8 @@ return { ["in-ipv4-bytes"] = 1494, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-icmpv4-bytes"] = 590, ["out-icmpv4-packets"] = 1, ["out-ipv4-bytes"] = 590, diff --git a/src/program/lwaftr/tests/data/counters/from-inet-ipv4-in-binding-big-packet-df-set-drop.lua b/src/program/lwaftr/tests/data/counters/from-inet-ipv4-in-binding-big-packet-df-set-drop.lua index a36a434c8d..d386f948fe 100644 --- a/src/program/lwaftr/tests/data/counters/from-inet-ipv4-in-binding-big-packet-df-set-drop.lua +++ b/src/program/lwaftr/tests/data/counters/from-inet-ipv4-in-binding-big-packet-df-set-drop.lua @@ -7,6 +7,6 @@ return { ["in-ipv4-bytes"] = 1494, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/from-to-b4-ipv6-hairpin.lua b/src/program/lwaftr/tests/data/counters/from-to-b4-ipv6-hairpin.lua index ec5f3150a8..9ba856630c 100644 --- a/src/program/lwaftr/tests/data/counters/from-to-b4-ipv6-hairpin.lua +++ b/src/program/lwaftr/tests/data/counters/from-to-b4-ipv6-hairpin.lua @@ -4,8 +4,8 @@ return { ["in-ipv6-bytes"] = 106, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 106, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/from-to-b4-tunneled-icmpv4-ping-hairpin-unbound.lua b/src/program/lwaftr/tests/data/counters/from-to-b4-tunneled-icmpv4-ping-hairpin-unbound.lua index 9eeeb04f84..995c9c1e70 100644 --- a/src/program/lwaftr/tests/data/counters/from-to-b4-tunneled-icmpv4-ping-hairpin-unbound.lua +++ b/src/program/lwaftr/tests/data/counters/from-to-b4-tunneled-icmpv4-ping-hairpin-unbound.lua @@ -10,6 +10,6 @@ return { ["in-ipv6-bytes"] = 138, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/from-to-b4-tunneled-icmpv4-ping-hairpin.lua b/src/program/lwaftr/tests/data/counters/from-to-b4-tunneled-icmpv4-ping-hairpin.lua index 64e0b6e8bc..3db1b65211 100644 --- a/src/program/lwaftr/tests/data/counters/from-to-b4-tunneled-icmpv4-ping-hairpin.lua +++ b/src/program/lwaftr/tests/data/counters/from-to-b4-tunneled-icmpv4-ping-hairpin.lua @@ -4,8 +4,8 @@ return { ["in-ipv6-bytes"] = 138, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 138, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/icmpv6-ping-and-reply.lua b/src/program/lwaftr/tests/data/counters/icmpv6-ping-and-reply.lua index 1943e90393..b552af4ad9 100644 --- a/src/program/lwaftr/tests/data/counters/icmpv6-ping-and-reply.lua +++ b/src/program/lwaftr/tests/data/counters/icmpv6-ping-and-reply.lua @@ -2,8 +2,8 @@ return { ["in-ipv6-bytes"] = 74, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 74, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-infrags-out-1p-ipv6-6-outfrags.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-infrags-out-1p-ipv6-6-outfrags.lua index 3befe53d43..c120deb63d 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-infrags-out-1p-ipv6-6-outfrags.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-infrags-out-1p-ipv6-6-outfrags.lua @@ -3,8 +3,8 @@ return { ["in-ipv4-frag-needsreassembly"] = 3, ["in-ipv4-frag-reassembled"] = 1, ["in-ipv4-packets"] = 3, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 1584, ["out-ipv6-frag"] = 2, ["out-ipv6-packets"] = 2, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-0p-drop.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-0p-drop.lua index 93ebc0ee42..ff88439bd6 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-0p-drop.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-0p-drop.lua @@ -2,6 +2,6 @@ return { ["in-ipv4-bytes"] = 66, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-icmpv4.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-icmpv4.lua index 2de95ffacb..353f35e619 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-icmpv4.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-icmpv4.lua @@ -6,8 +6,8 @@ return { ["in-ipv4-bytes"] = 66, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-icmpv4-bytes"] = 94, ["out-icmpv4-packets"] = 1, ["out-ipv4-bytes"] = 94, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-1.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-1.lua index e521404b14..4350b67d10 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-1.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-1.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 66, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 106, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-2.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-2.lua index 9839223fc6..0a05fe1a22 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-2.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-2.lua @@ -3,8 +3,8 @@ return { ["in-ipv4-frag-needsreassembly"] = 3, ["in-ipv4-frag-reassembled"] = 1, ["in-ipv4-packets"] = 3, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 1500, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-3.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-3.lua index c6c8388c2d..7c5ea51874 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-3.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-3.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 1494, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 1604, ["out-ipv6-frag"] = 2, ["out-ipv6-packets"] = 2, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-4.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-4.lua index 3ad73d1c00..e2ff0f673e 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-4.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-4.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 2734, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 2906, ["out-ipv6-frag"] = 3, ["out-ipv6-packets"] = 3, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-6-outfrags.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-6-outfrags.lua index fde541804b..93da1c0130 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-6-outfrags.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-6-outfrags.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 1474, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 1584, ["out-ipv6-frag"] = 2, ["out-ipv6-packets"] = 2, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-6.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-6.lua index 4df70324b4..88a9e7b3a6 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-6.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-6.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 1474, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 1514, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-7.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-7.lua index a6d171a1d5..1ecd1b8dba 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-7.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-7.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 98, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 138, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-8.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-8.lua index 479e4b2624..e3b276150f 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-8.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-8.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 70, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 110, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-echo.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-echo.lua index e43bbb83fc..0f4fa7977f 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-echo.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-1p-ipv6-echo.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 120, ["in-ipv4-frag-reassembly-unneeded"] = 2, ["in-ipv4-packets"] = 2, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 54, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-1.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-1.lua index 25d079a511..caa23da4dd 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-1.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-1.lua @@ -7,6 +7,6 @@ return { ["in-ipv4-bytes"] = 66, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-2.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-2.lua index a41d571808..9fe0e2ec7b 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-2.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-2.lua @@ -6,6 +6,6 @@ return { ["in-ipv4-bytes"] = 98, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-3.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-3.lua index b5dec7f599..248600d5ed 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-3.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-3.lua @@ -6,6 +6,6 @@ return { ["in-ipv4-bytes"] = 98, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-4.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-4.lua index dd479f7c93..c25181f669 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-4.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv4-out-none-4.lua @@ -8,6 +8,6 @@ return { ["in-ipv4-bytes"] = 98, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-0p-ipv4.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-0p-ipv4.lua index ba8ea99669..38b3ad4eec 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-0p-ipv4.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-0p-ipv4.lua @@ -3,6 +3,6 @@ return { ["in-ipv6-bytes"] = 1604, ["in-ipv6-frag-needsreassembly"] = 2, ["in-ipv6-packets"] = 2, - ["memuse-ipv4-frag-reassembly-buffer"] = 457260448, - ["memuse-ipv6-frag-reassembly-buffer"] = 247536, + ["memuse-ipv4-frag-reassembly-buffer"] = 456638204, + ["memuse-ipv6-frag-reassembly-buffer"] = 247200, } diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv4-1.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv4-1.lua index 1eda0601d1..8e0c5a0c15 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv4-1.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv4-1.lua @@ -2,8 +2,8 @@ return { ["in-ipv6-bytes"] = 154, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-icmpv4-bytes"] = 94, ["out-icmpv4-packets"] = 1, ["out-ipv4-bytes"] = 94, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv6-1.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv6-1.lua index 87ff2c58a3..36cb51997a 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv6-1.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv6-1.lua @@ -6,8 +6,8 @@ return { ["in-ipv6-bytes"] = 106, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-icmpv6-bytes"] = 154, ["out-icmpv6-packets"] = 1, ["out-ipv6-bytes"] = 154, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv6-2.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv6-2.lua index dc82621f2e..aee4d22790 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv6-2.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-icmpv6-2.lua @@ -6,8 +6,8 @@ return { ["in-ipv6-bytes"] = 138, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-icmpv6-bytes"] = 186, ["out-icmpv6-packets"] = 1, ["out-ipv6-bytes"] = 186, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-1.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-1.lua index 2342b84252..59318a826c 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-1.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-1.lua @@ -2,8 +2,8 @@ return { ["in-ipv6-bytes"] = 1046, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 1040, ["out-ipv4-frag"] = 2, ["out-ipv4-packets"] = 2, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-2.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-2.lua index b4fe67ae84..815ba30ab2 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-2.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-2.lua @@ -2,8 +2,8 @@ return { ["in-ipv6-bytes"] = 1500, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 1528, ["out-ipv4-frag"] = 3, ["out-ipv4-packets"] = 3, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-3.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-3.lua index c64609799d..65755eb143 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-3.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-3.lua @@ -3,8 +3,8 @@ return { ["in-ipv6-frag-needsreassembly"] = 2, ["in-ipv6-frag-reassembled"] = 1, ["in-ipv6-packets"] = 2, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 1494, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-4-and-echo.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-4-and-echo.lua index 00d167f02f..c052037a71 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-4-and-echo.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-4-and-echo.lua @@ -2,8 +2,8 @@ return { ["in-ipv6-bytes"] = 180, ["in-ipv6-frag-reassembly-unneeded"] = 2, ["in-ipv6-packets"] = 2, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 66, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-4.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-4.lua index cff87393bf..2642132c59 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-4.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-4.lua @@ -2,8 +2,8 @@ return { ["in-ipv6-bytes"] = 106, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 66, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-5-frags.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-5-frags.lua index 78983c88e5..81bf061c0c 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-5-frags.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-5-frags.lua @@ -3,8 +3,8 @@ return { ["in-ipv6-frag-needsreassembly"] = 2, ["in-ipv6-frag-reassembled"] = 1, ["in-ipv6-packets"] = 2, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 1474, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-5.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-5.lua index 14de0349cc..c9f0f4f72d 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-5.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-5.lua @@ -3,8 +3,8 @@ return { ["in-ipv6-frag-needsreassembly"] = 2, ["in-ipv6-frag-reassembled"] = 1, ["in-ipv6-packets"] = 2, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 1542, ["out-ipv4-frag"] = 3, ["out-ipv4-packets"] = 3, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-hoplimhair.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-hoplimhair.lua index 45ae24b062..d871522e31 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-hoplimhair.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-1p-ipv4-hoplimhair.lua @@ -2,8 +2,8 @@ return { ["in-ipv6-bytes"] = 154, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-icmpv4-bytes"] = 94, ["out-icmpv4-packets"] = 1, ["out-ipv6-bytes"] = 134, diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-none-1.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-none-1.lua index f4bf4f6796..b2ea80fdac 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-none-1.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-none-1.lua @@ -7,6 +7,6 @@ return { ["in-ipv6-bytes"] = 106, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-none-2.lua b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-none-2.lua index 457d3fde7b..fc8fba2ef3 100644 --- a/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-none-2.lua +++ b/src/program/lwaftr/tests/data/counters/in-1p-ipv6-out-none-2.lua @@ -6,6 +6,6 @@ return { ["in-ipv6-bytes"] = 154, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/in-ipv4-ipv6-out-icmpv4-ipv6-hairpin-1-drop.lua b/src/program/lwaftr/tests/data/counters/in-ipv4-ipv6-out-icmpv4-ipv6-hairpin-1-drop.lua index cc629b1f8f..1cd2294ee6 100644 --- a/src/program/lwaftr/tests/data/counters/in-ipv4-ipv6-out-icmpv4-ipv6-hairpin-1-drop.lua +++ b/src/program/lwaftr/tests/data/counters/in-ipv4-ipv6-out-icmpv4-ipv6-hairpin-1-drop.lua @@ -9,6 +9,6 @@ return { ["in-ipv6-bytes"] = 106, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/in-ipv4-ipv6-out-icmpv4-ipv6-hairpin-1.lua b/src/program/lwaftr/tests/data/counters/in-ipv4-ipv6-out-icmpv4-ipv6-hairpin-1.lua index b66620e45d..a012f28ab1 100644 --- a/src/program/lwaftr/tests/data/counters/in-ipv4-ipv6-out-icmpv4-ipv6-hairpin-1.lua +++ b/src/program/lwaftr/tests/data/counters/in-ipv4-ipv6-out-icmpv4-ipv6-hairpin-1.lua @@ -8,8 +8,8 @@ return { ["in-ipv6-bytes"] = 106, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-icmpv4-bytes"] = 94, ["out-icmpv4-packets"] = 1, ["out-ipv6-bytes"] = 134, diff --git a/src/program/lwaftr/tests/data/counters/ndp-no-na-next-hop6-mac-not-set-2pkts.lua b/src/program/lwaftr/tests/data/counters/ndp-no-na-next-hop6-mac-not-set-2pkts.lua index fdef1b5e1d..24b29f7c45 100644 --- a/src/program/lwaftr/tests/data/counters/ndp-no-na-next-hop6-mac-not-set-2pkts.lua +++ b/src/program/lwaftr/tests/data/counters/ndp-no-na-next-hop6-mac-not-set-2pkts.lua @@ -4,8 +4,8 @@ return { ["in-ipv6-bytes"] = 212, ["in-ipv6-frag-reassembly-unneeded"] = 2, ["in-ipv6-packets"] = 2, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 66, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/ndp-no-na-next-hop6-mac-not-set-3pkts.lua b/src/program/lwaftr/tests/data/counters/ndp-no-na-next-hop6-mac-not-set-3pkts.lua index 7ed9832093..fe05b52053 100644 --- a/src/program/lwaftr/tests/data/counters/ndp-no-na-next-hop6-mac-not-set-3pkts.lua +++ b/src/program/lwaftr/tests/data/counters/ndp-no-na-next-hop6-mac-not-set-3pkts.lua @@ -4,8 +4,8 @@ return { ["in-ipv6-bytes"] = 298, ["in-ipv6-frag-reassembly-unneeded"] = 3, ["in-ipv6-packets"] = 3, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 66, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/ndp-ns-for-next-hop.lua b/src/program/lwaftr/tests/data/counters/ndp-ns-for-next-hop.lua index 9a580af82b..df52bfb889 100644 --- a/src/program/lwaftr/tests/data/counters/ndp-ns-for-next-hop.lua +++ b/src/program/lwaftr/tests/data/counters/ndp-ns-for-next-hop.lua @@ -1,6 +1,6 @@ return { - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 86, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/nofrag4-arp.lua b/src/program/lwaftr/tests/data/counters/nofrag4-arp.lua index a9e0e431a6..5904d7d23a 100644 --- a/src/program/lwaftr/tests/data/counters/nofrag4-arp.lua +++ b/src/program/lwaftr/tests/data/counters/nofrag4-arp.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 42, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 42, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/nofrag4-ping.lua b/src/program/lwaftr/tests/data/counters/nofrag4-ping.lua index 6af4f51744..584a44aae8 100644 --- a/src/program/lwaftr/tests/data/counters/nofrag4-ping.lua +++ b/src/program/lwaftr/tests/data/counters/nofrag4-ping.lua @@ -2,8 +2,8 @@ return { ["in-ipv4-bytes"] = 54, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv4-bytes"] = 54, ["out-ipv4-frag-not"] = 1, ["out-ipv4-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/nofrag6-filterdrop.lua b/src/program/lwaftr/tests/data/counters/nofrag6-filterdrop.lua index 4b3c7ee574..55f162e367 100644 --- a/src/program/lwaftr/tests/data/counters/nofrag6-filterdrop.lua +++ b/src/program/lwaftr/tests/data/counters/nofrag6-filterdrop.lua @@ -2,6 +2,6 @@ return { ["in-ipv6-bytes"] = 106, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/nofrag6-ns-badip.lua b/src/program/lwaftr/tests/data/counters/nofrag6-ns-badip.lua index f42381bf51..615876c2b8 100644 --- a/src/program/lwaftr/tests/data/counters/nofrag6-ns-badip.lua +++ b/src/program/lwaftr/tests/data/counters/nofrag6-ns-badip.lua @@ -2,6 +2,6 @@ return { ["in-ipv6-bytes"] = 86, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/nofrag6-sol.lua b/src/program/lwaftr/tests/data/counters/nofrag6-sol.lua index 463c592bc0..9621d342de 100644 --- a/src/program/lwaftr/tests/data/counters/nofrag6-sol.lua +++ b/src/program/lwaftr/tests/data/counters/nofrag6-sol.lua @@ -2,8 +2,8 @@ return { ["in-ipv6-bytes"] = 86, ["in-ipv6-frag-reassembly-unneeded"] = 1, ["in-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-ipv6-bytes"] = 86, ["out-ipv6-frag-not"] = 1, ["out-ipv6-packets"] = 1, diff --git a/src/program/lwaftr/tests/data/counters/non-ipv4-traffic-to-ipv4-interface.lua b/src/program/lwaftr/tests/data/counters/non-ipv4-traffic-to-ipv4-interface.lua index e0fcab65c8..9400e1d61b 100644 --- a/src/program/lwaftr/tests/data/counters/non-ipv4-traffic-to-ipv4-interface.lua +++ b/src/program/lwaftr/tests/data/counters/non-ipv4-traffic-to-ipv4-interface.lua @@ -3,6 +3,6 @@ return { ["drop-all-ipv6-iface-packets"] = 1, ["drop-misplaced-not-ipv6-bytes"] = 66, ["drop-misplaced-not-ipv6-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/non-ipv6-traffic-to-ipv6-interface.lua b/src/program/lwaftr/tests/data/counters/non-ipv6-traffic-to-ipv6-interface.lua index 30ad5da4d0..f8f2449a80 100644 --- a/src/program/lwaftr/tests/data/counters/non-ipv6-traffic-to-ipv6-interface.lua +++ b/src/program/lwaftr/tests/data/counters/non-ipv6-traffic-to-ipv6-interface.lua @@ -3,6 +3,6 @@ return { ["drop-all-ipv4-iface-packets"] = 1, ["drop-misplaced-not-ipv4-bytes"] = 106, ["drop-misplaced-not-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, } diff --git a/src/program/lwaftr/tests/data/counters/tcp-frominet-bound-ttl1.lua b/src/program/lwaftr/tests/data/counters/tcp-frominet-bound-ttl1.lua index 80bf430dd2..ebca6730cd 100644 --- a/src/program/lwaftr/tests/data/counters/tcp-frominet-bound-ttl1.lua +++ b/src/program/lwaftr/tests/data/counters/tcp-frominet-bound-ttl1.lua @@ -6,8 +6,8 @@ return { ["in-ipv4-bytes"] = 66, ["in-ipv4-frag-reassembly-unneeded"] = 1, ["in-ipv4-packets"] = 1, - ["memuse-ipv4-frag-reassembly-buffer"] = 464194024, - ["memuse-ipv6-frag-reassembly-buffer"] = 465349620, + ["memuse-ipv4-frag-reassembly-buffer"] = 463571780, + ["memuse-ipv6-frag-reassembly-buffer"] = 464727376, ["out-icmpv4-bytes"] = 94, ["out-icmpv4-packets"] = 1, ["out-ipv4-bytes"] = 94, From 168e27a76474bae306408be1085145af5bde0406 Mon Sep 17 00:00:00 2001 From: Katerina Barone-Adesi Date: Tue, 30 Aug 2016 11:22:33 +0200 Subject: [PATCH 2/2] Removed unused parameter --- src/apps/lwaftr/fragmentv6_hardened.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/lwaftr/fragmentv6_hardened.lua b/src/apps/lwaftr/fragmentv6_hardened.lua index e0240cbd6a..b8452a9f79 100644 --- a/src/apps/lwaftr/fragmentv6_hardened.lua +++ b/src/apps/lwaftr/fragmentv6_hardened.lua @@ -245,7 +245,7 @@ local function hash_ipv6(key) return hash end -function initialize_frag_table(max_fragmented_packets, max_pkt_frag, memuse_counter) +function initialize_frag_table(max_fragmented_packets, max_pkt_frag) -- Initialize module-scoped variables max_frags_per_packet = max_pkt_frag ipv6_reassembly_buffer_t = ffi.typeof([[