[PATCH ulogd2] pgsql: correct `ulog2.ip_totlen` type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux