* [PATCH ulogd2] pgsql: correct `ulog2.ip_totlen` type
@ 2022-11-29 21:11 Jeremy Sowden
2022-12-08 21:27 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Sowden @ 2022-11-29 21:11 UTC (permalink / raw)
To: Netfilter Devel
The types of `ip_totlen` in the `ulog` view and the `INSERT_IP_PACKET_FULL`
function are `integer`, but the column in the `ulog2` table is `smallint`. The
"total length" field of an IP packet is an unsigned 16-bit integer, whereas
`smallint` in PostgreSQL is a signed 16-bit integer type. Change the type of
`ulog2.ip_totlen` to `integer`.
Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1556
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
doc/pgsql-ulogd2-flat.sql | 2 +-
doc/pgsql-ulogd2.sql | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/pgsql-ulogd2-flat.sql b/doc/pgsql-ulogd2-flat.sql
index 6cd2150cd96b..94c903795ede 100644
--- a/doc/pgsql-ulogd2-flat.sql
+++ b/doc/pgsql-ulogd2-flat.sql
@@ -43,7 +43,7 @@ CREATE TABLE ulog2 (
ip_protocol smallint default NULL,
ip_tos smallint default NULL,
ip_ttl smallint default NULL,
- ip_totlen smallint default NULL,
+ ip_totlen integer default NULL,
ip_ihl smallint default NULL,
ip_csum integer default NULL,
ip_id integer default NULL,
diff --git a/doc/pgsql-ulogd2.sql b/doc/pgsql-ulogd2.sql
index 0e01ba4ba57d..edc81e760768 100644
--- a/doc/pgsql-ulogd2.sql
+++ b/doc/pgsql-ulogd2.sql
@@ -55,7 +55,7 @@ CREATE TABLE ulog2 (
ip_protocol smallint default NULL,
ip_tos smallint default NULL,
ip_ttl smallint default NULL,
- ip_totlen smallint default NULL,
+ ip_totlen integer default NULL,
ip_ihl smallint default NULL,
ip_csum integer default NULL,
ip_id integer default NULL,
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH ulogd2] pgsql: correct `ulog2.ip_totlen` type
2022-11-29 21:11 [PATCH ulogd2] pgsql: correct `ulog2.ip_totlen` type Jeremy Sowden
@ 2022-12-08 21:27 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2022-12-08 21:27 UTC (permalink / raw)
To: Jeremy Sowden; +Cc: Netfilter Devel
On Tue, Nov 29, 2022 at 09:11:27PM +0000, Jeremy Sowden wrote:
> The types of `ip_totlen` in the `ulog` view and the `INSERT_IP_PACKET_FULL`
> function are `integer`, but the column in the `ulog2` table is `smallint`. The
> "total length" field of an IP packet is an unsigned 16-bit integer, whereas
> `smallint` in PostgreSQL is a signed 16-bit integer type. Change the type of
> `ulog2.ip_totlen` to `integer`.
Also applied this to ulogd2, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-08 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29 21:11 [PATCH ulogd2] pgsql: correct `ulog2.ip_totlen` type Jeremy Sowden
2022-12-08 21:27 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).