pgsql: correct `ulog2.ip_totlen` type
PATCH 1/1 pgsql: correct `ulog2.ip_totlen` type
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.
Signed-off-by Jeremy Sowden <[email protected]>
--- doc/pgsql-ulogd2-flat.sql | 2 +- doc/pgsql-ulogd2.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
doc/pgsql-ulogd2-flat.sql +1 -1
@@ -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,
doc/pgsql-ulogd2.sql +1 -1
@@ -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,
Signature · 1 line
2.35.1
Pablo Neira Ayuso
maintainerQuoted 5 lines · Jeremy Sowden
The types of
ip_totlenin theulogview and theINSERT_IP_PACKET_FULLfunction areinteger, but the column in theulog2table issmallint. The "total length" field of an IP packet is an unsigned 16-bit integer, whereassmallintin PostgreSQL is a signed 16-bit integer type. Change the type ofulog2.ip_totlentointeger.
Also applied this to ulogd2, thanks.