All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Sowden <jeremy@azazel.net>
To: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: [PATCH ulogd2] pgsql: correct `ulog2.ip_totlen` type
Date: Tue, 29 Nov 2022 21:11:27 +0000	[thread overview]
Message-ID: <20221129211127.246934-1-jeremy@azazel.net> (raw)

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


             reply	other threads:[~2022-11-29 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 21:11 Jeremy Sowden [this message]
2022-12-08 21:27 ` [PATCH ulogd2] pgsql: correct `ulog2.ip_totlen` type Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221129211127.246934-1-jeremy@azazel.net \
    --to=jeremy@azazel.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.