freebsd-dev/sys/netpfil/ipfw
Marius Strobl 0ac43d9728 In dummynet(4), random chunks of memory are casted to struct dn_*,
potentially leading to fatal unaligned accesses on architectures with
strict alignment requirements. This change fixes dummynet(4) as far
as accesses to 64-bit members of struct dn_* are concerned, tripping
up on sparc64 with accesses to 32-bit members happening to be correctly
aligned there. In other words, this only fixes the tip of the iceberg;
larger parts of dummynet(4) still need to be rewritten in order to
properly work on all of !x86.
In principle, considering the amount of code in dummynet(4) that needs
this erroneous pattern corrected, an acceptable workaround would be to
declare all struct dn_* packed, forcing compilers to do byte-accesses
as a side-effect. However, given that the structs in question aren't
laid out well either, this would break ABI/KBI.
While at it, replace all existing bcopy(9) calls with memcpy(9) for
performance reasons, as there is no need to check for overlap in these
cases.

PR:		189219
MFC after:	5 days
2017-01-09 20:51:51 +00:00
..
nat64 Fix ICMPv6 Time Exceeded error message translation. 2016-11-26 10:04:05 +00:00
nptv6 Add stats reset command implementation to NPTv6 module 2016-08-13 16:45:14 +00:00
test cleanup and document in some detail the internals of the testing code 2016-01-27 02:22:31 +00:00
dn_aqm_codel.c Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_aqm_codel.h Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_aqm_pie.c Fix a race condition between the main thread in aqm_pie_cleanup() and the 2016-07-05 00:53:01 +00:00
dn_aqm_pie.h Replace constant expressions that contain multiplications by 2016-06-01 20:04:24 +00:00
dn_aqm.h Correct a typo in a comment. 2016-05-26 22:03:28 +00:00
dn_heap.c avoid warnings for signed/unsigned comparison and unused arguments 2016-01-26 22:45:05 +00:00
dn_heap.h sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
dn_sched_fifo.c Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_sched_fq_codel_helper.h Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_sched_fq_codel.c Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_sched_fq_codel.h Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_sched_fq_pie.c Fix problems in the FQ-PIE AQM cleanup code that could leak memory or 2016-07-12 17:32:40 +00:00
dn_sched_prio.c Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_sched_qfq.c Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_sched_rr.c Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_sched_wf2q.c Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
dn_sched.h Get closer to a VIMAGE network stack teardown from top to bottom rather 2016-06-21 13:48:49 +00:00
dummynet.txt sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
ip_dn_glue.c Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
ip_dn_io.c Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
ip_dn_private.h Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). 2016-05-26 21:40:13 +00:00
ip_dummynet.c In dummynet(4), random chunks of memory are casted to struct dn_*, 2017-01-09 20:51:51 +00:00
ip_fw2.c Move opcode rewriter init and destroy handlers into non-VENT code. 2016-09-18 17:35:17 +00:00
ip_fw_bpf.c Move logging via BPF support into separate file. 2016-08-13 15:41:04 +00:00
ip_fw_dynamic.c Convert result of hash_packet6() into host byte order. 2016-12-06 23:52:56 +00:00
ip_fw_eaction.c Make named objects set-aware. Now it is possible to create named 2016-05-17 07:47:23 +00:00
ip_fw_iface.c Change the type of objhash_cb_t callback function to be able return an 2016-05-06 03:18:51 +00:00
ip_fw_log.c Move logging via BPF support into separate file. 2016-08-13 15:41:04 +00:00
ip_fw_nat.c In case of the global eventhandler make sure the current VNET 2016-06-30 19:32:45 +00:00
ip_fw_pfil.c Remove the mbuf tag after use (for reinjected packets). 2016-11-03 00:26:58 +00:00
ip_fw_private.h Add three helper function to manage tables from external modules. 2016-08-13 15:48:56 +00:00
ip_fw_sockopt.c Fix command: ipfw set (enable|disable) N (where N > 4). 2016-08-15 13:06:29 +00:00
ip_fw_table_algo.c Fix 4-byte overflow in ipv6_writemask. 2016-06-05 10:33:53 +00:00
ip_fw_table_value.c Change the type of objhash_cb_t callback function to be able return an 2016-05-06 03:18:51 +00:00
ip_fw_table.c Fix ipfw table lookup handler to return entry value, but not its index. 2016-10-19 11:51:17 +00:00
ip_fw_table.h Add ipfw_check_object_name_generic() function to do basic checks for an 2015-11-03 10:29:46 +00:00