Gleb Smirnoff
c93410229c
Most Ethernet drivers that potentially can run a pfil(9) hook with
...
PFIL_MEMPTR flag are intentionally providing a memory address that
isn't aligned to pointer alignment. This is done to align an IPv4
or IPv6 header that is expected to follow Ethernet header.
When we return PFIL_REALLOCED we store a pointer to allocated mbuf
at this address. With this change the KPI changes to store the pointer
at aligned address, which usually yields in +2 bytes.
Provide two inlines:
pfil_packet_align() to get aligned pfil_packet_t for a misaligned one
pfil_mem2mbuf() to read out mbuf pointer from misaligned pfil_packet_t
Provide function pfil_realloc(), not used yet, that would convert a
memory pfil_packet_t to an mbuf one.
Reported by: hps
Reviewed by: hps, gallatin
2019-03-10 17:20:09 +00:00
..
2019-02-11 05:17:31 +00:00
2017-11-20 19:43:44 +00:00
2017-11-27 15:23:17 +00:00
2017-11-20 19:43:44 +00:00
2018-06-13 17:04:41 +00:00
2018-06-13 17:04:41 +00:00
2017-11-27 15:23:17 +00:00
2017-11-27 15:23:17 +00:00
2018-07-24 16:35:52 +00:00
2017-11-20 19:43:44 +00:00
2018-06-19 10:34:45 +00:00
2019-01-09 01:11:19 +00:00
2017-11-27 15:23:17 +00:00
2018-05-31 09:11:21 +00:00
2018-03-27 15:29:32 +00:00
2017-11-27 15:23:17 +00:00
2018-08-22 18:19:56 +00:00
2017-11-27 15:23:17 +00:00
2017-11-27 15:23:17 +00:00
2019-03-09 01:12:59 +00:00
2019-03-04 22:01:09 +00:00
2018-05-11 05:00:40 +00:00
2018-07-24 16:35:52 +00:00
2018-05-11 20:08:28 +00:00
2017-11-27 15:23:17 +00:00
2017-11-27 15:23:17 +00:00
2018-07-24 16:35:52 +00:00
2017-11-20 19:43:44 +00:00
2018-07-24 16:35:52 +00:00
2019-01-31 23:01:03 +00:00
2017-11-27 15:23:17 +00:00
2018-07-24 16:35:52 +00:00
2019-03-06 23:31:42 +00:00
2018-03-27 20:51:49 +00:00
2018-10-21 18:06:15 +00:00
2018-10-21 18:06:15 +00:00
2018-10-21 18:13:45 +00:00
2018-10-21 18:13:45 +00:00
2018-11-16 14:21:57 +00:00
2019-02-13 14:57:59 +00:00
2018-05-24 23:21:23 +00:00
2019-01-09 01:11:19 +00:00
2018-05-24 23:21:23 +00:00
2017-11-20 19:43:44 +00:00
2018-07-24 16:35:52 +00:00
2018-10-23 13:11:45 +00:00
2018-04-23 21:10:33 +00:00
2018-08-22 18:19:56 +00:00
2017-11-27 15:23:17 +00:00
2017-11-27 15:23:17 +00:00
2018-05-18 20:13:34 +00:00
2018-10-27 04:45:28 +00:00
2018-12-11 19:32:16 +00:00
2017-11-27 15:23:17 +00:00
2017-11-27 15:23:17 +00:00
2019-03-05 13:21:07 +00:00
2017-11-20 19:43:44 +00:00
2019-01-31 23:01:03 +00:00
2018-08-16 23:46:38 +00:00
2019-02-13 14:57:59 +00:00
2018-05-19 05:27:49 +00:00
2017-12-30 04:03:53 +00:00
2019-01-22 17:39:26 +00:00
2018-11-26 13:42:18 +00:00
2018-05-11 20:08:28 +00:00
2018-05-11 20:08:28 +00:00
2018-11-27 20:01:05 +00:00
2019-03-05 19:12:51 +00:00
2019-01-22 01:11:17 +00:00
2017-11-20 19:43:44 +00:00
2019-01-03 23:06:05 +00:00
2019-01-03 23:06:05 +00:00
2017-11-27 15:23:17 +00:00
2018-07-24 16:35:52 +00:00
2017-11-27 15:23:17 +00:00
2018-04-12 07:20:50 +00:00
2018-12-05 11:57:16 +00:00
2018-12-05 11:57:16 +00:00
2019-02-02 22:39:29 +00:00
2019-03-10 17:20:09 +00:00
2019-03-10 17:20:09 +00:00
2017-11-20 19:43:44 +00:00
2019-02-11 05:17:31 +00:00
2018-06-16 08:26:23 +00:00
2017-11-20 19:43:44 +00:00
2018-06-16 08:26:23 +00:00
2018-06-16 19:21:09 +00:00
2017-11-20 19:43:44 +00:00
2017-11-20 19:43:44 +00:00
2017-11-20 19:43:44 +00:00
2017-07-24 03:59:50 +00:00
2018-06-16 08:26:23 +00:00
2019-01-09 01:11:19 +00:00
2018-11-26 13:42:18 +00:00
2017-10-11 06:08:01 +00:00
2017-10-11 06:08:01 +00:00
2019-01-11 00:45:22 +00:00
2017-12-05 18:42:07 +00:00
2017-11-20 19:43:44 +00:00
2017-11-20 19:43:44 +00:00
2018-10-30 20:45:15 +00:00
2018-09-12 08:05:33 +00:00