Hello, On Saturday, 2008 April 12 at 11:49:25 +0200, Eric Leblond wrote: > Hello, > > On Saturday, 2008 April 12 at 12:43:08 +0500, Anton wrote: > > Erik, > > > > Seems it fixes ICMP inserts. > > Ok, fine. > > > Just for testing I tried MYSQL > > logging too - it works without errors in log file, and > > looks it logs more data than PGSQL. > > Yes, we're working on this issue. It seems PGSQL do not manage to find > the called SQL function due to type detection problem. This cause PGSQL > to loose some packets. The attached patch should fix the ICMP problem and the non-logging problem. It is ok now on my test system. Please note that you need to drop functions in the PGSQL schema before applying the new schema. BR, -- Eric Leblond INL: http://www.inl.fr/ NuFW: http://www.nufw.org/
diff --git a/doc/pgsql-ulogd2.sql b/doc/pgsql-ulogd2.sql index b18f4a8..6f1d9f4 100644 --- a/doc/pgsql-ulogd2.sql +++ b/doc/pgsql-ulogd2.sql @@ -86,7 +86,7 @@ CREATE TABLE tcp ( tcp_sport integer default NULL, tcp_dport integer default NULL, tcp_seq bigint default NULL, - tcp_ackseq integer default NULL, + tcp_ackseq bigint default NULL, tcp_window integer default NULL, tcp_urg boolean default NULL, tcp_urgp integer default NULL, @@ -120,8 +120,8 @@ CREATE TABLE icmp ( _icmp_id bigint PRIMARY KEY UNIQUE NOT NULL, icmp_type smallint default NULL, icmp_code smallint default NULL, - icmp_echoid smallint default NULL, - icmp_echoseq smallint default NULL, + icmp_echoid integer default NULL, + icmp_echoseq integer default NULL, icmp_gateway integer default NULL, icmp_fragmtu smallint default NULL ) WITH (OIDS=FALSE); @@ -130,8 +130,8 @@ CREATE TABLE icmpv6 ( _icmpv6_id bigint PRIMARY KEY UNIQUE NOT NULL, icmpv6_type smallint default NULL, icmpv6_code smallint default NULL, - icmpv6_echoid smallint default NULL, - icmpv6_echoseq smallint default NULL, + icmpv6_echoid integer default NULL, + icmpv6_echoseq integer default NULL, icmpv6_csum integer default NULL ) WITH (OIDS=FALSE); @@ -294,7 +294,7 @@ DROP TABLE IF EXISTS nufw; CREATE TABLE nufw ( _nufw_id bigint PRIMARY KEY UNIQUE NOT NULL, username varchar(30) default NULL, - user_id smallint default NULL, + user_id integer default NULL, client_os varchar(100) default NULL, client_app varchar(256) default NULL ) WITH (OIDS=FALSE); @@ -389,7 +389,7 @@ CREATE OR REPLACE FUNCTION INSERT_TCP_FULL( IN tcp_sport integer, IN tcp_dport integer, IN tcp_seq bigint, - IN tcp_ackseq integer, + IN tcp_ackseq bigint, IN tcp_window integer, IN tcp_urg boolean, IN tcp_urgp integer , @@ -492,7 +492,7 @@ CREATE OR REPLACE FUNCTION INSERT_PACKET_FULL( IN tcp_sport integer, IN tcp_dport integer, IN tcp_seq bigint, - IN tcp_ackseq integer, + IN tcp_ackseq bigint, IN tcp_window integer, IN tcp_urg boolean, IN tcp_urgp integer ,
Attachment:
signature.asc
Description: Digital signature