Pablo Neira Ayuso
cba85b532e
netfilter: fix export secctx error handling
...
In 1ae4de0cdf , the secctx was exported
via the /proc/net/netfilter/nf_conntrack and ctnetlink interfaces
instead of the secmark.
That patch introduced the use of security_secid_to_secctx() which may
return a non-zero value on error.
In one of my setups, I have NF_CONNTRACK_SECMARK enabled but no
security modules. Thus, security_secid_to_secctx() returns a negative
value that results in the breakage of the /proc and `conntrack -L'
outputs. To fix this, we skip the inclusion of secctx if the
aforementioned function fails.
This patch also fixes the dynamic netlink message size calculation
if security_secid_to_secctx() returns an error, since its logic is
also wrong.
This problem exists in Linux kernel >= 2.6.37.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2011-01-06 11:25:00 -08:00
..
2010-11-19 13:13:47 -08:00
2010-11-17 10:54:34 -08:00
2010-10-25 13:58:36 -07:00
2010-07-23 12:59:36 +02:00
2010-06-25 14:46:56 +02:00
2010-05-13 15:02:08 +02:00
2011-01-06 11:22:20 -08:00
2010-08-19 17:18:01 -07:00
2011-01-06 11:22:20 -08:00
2010-10-07 09:43:45 +02:00
2010-05-13 15:02:08 +02:00
2008-01-31 19:28:07 -08:00
2010-06-10 23:31:35 -07:00
2008-01-31 19:28:07 -08:00
2010-03-30 22:02:32 +09:00
2010-05-13 15:02:08 +02:00
2008-04-14 11:15:52 +02:00
2010-06-10 23:31:35 -07:00
2011-01-06 11:25:00 -08:00
2010-02-15 18:13:33 +01:00
2010-03-30 22:02:32 +09:00
2009-11-12 02:05:06 -08:00
2010-03-30 22:02:32 +09:00
2010-05-13 15:02:08 +02:00
2010-10-18 11:03:14 +02:00
2010-02-15 17:45:08 +01:00
2010-02-15 17:45:08 +01:00
2010-10-29 19:59:40 +02:00
2010-03-30 22:02:32 +09:00
2010-10-21 08:21:34 -07:00
2011-01-06 11:25:00 -08:00
2010-05-13 15:02:08 +02:00
2010-05-13 15:02:08 +02:00
2010-08-19 17:18:01 -07:00
2010-08-19 17:18:01 -07:00
2009-09-30 16:12:20 -07:00
2010-10-21 08:21:34 -07:00
2010-06-15 13:49:24 -07:00
2010-06-15 13:49:24 -07:00
2010-05-13 15:02:08 +02:00
2010-10-04 22:24:12 +02:00
2010-07-15 17:20:46 +02:00
2010-05-11 18:31:17 +02:00
2010-06-08 16:09:52 +02:00
2010-05-11 18:33:37 +02:00
2010-06-25 14:44:07 +02:00
2010-05-11 18:35:27 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:31:17 +02:00
2010-06-08 16:09:52 +02:00
2010-07-23 12:59:36 +02:00
2010-10-21 10:12:48 +11:00
2010-05-11 18:35:27 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:31:17 +02:00
2010-05-11 18:35:27 +02:00
2010-08-19 17:16:25 -07:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:31:17 +02:00
2010-06-22 08:13:31 +02:00
2010-05-11 18:33:37 +02:00
2010-10-04 21:00:42 +02:00
2010-05-11 18:31:17 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:35:27 +02:00
2010-05-11 18:31:17 +02:00
2010-05-11 18:31:17 +02:00
2010-06-08 16:09:52 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:33:37 +02:00
2010-07-23 14:07:47 +02:00
2010-05-11 18:33:37 +02:00
2010-06-11 18:37:08 -07:00
2010-05-11 18:33:37 +02:00
2010-10-15 15:53:27 +02:00
2010-02-10 17:50:47 +01:00
2010-06-09 14:47:40 +02:00
2010-10-21 10:12:48 +11:00
2010-10-28 12:59:53 -07:00
2010-06-08 16:09:52 +02:00
2010-06-01 12:00:41 +02:00
2010-05-11 18:33:37 +02:00
2010-05-11 18:35:27 +02:00
2010-06-15 11:56:19 -07:00
2010-05-11 18:31:17 +02:00
2010-05-11 18:35:27 +02:00
2010-11-17 12:27:45 -08:00
2010-05-13 15:16:27 +02:00
2010-10-25 13:58:36 -07:00
2010-05-11 18:31:17 +02:00
2010-05-11 18:33:37 +02:00