pknock: add CONNECTOR guards

This commit is contained in:
Jan Engelhardt
2009-10-09 18:15:27 +02:00
parent 6bb354d3f0
commit 82a8524f1a
2 changed files with 10 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ Supported configurations for this release
- CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK
- CONFIG_NF_CONNTRACK_MARK or CONFIG_IP_NF_CONNTRACK_MARK
enabled =y or as module (=m)
- CONFIG_CONNECTOR y/m if you wish to receive userspace
notifications from pknock through netlink/connector
Extra notes:

View File

@@ -666,6 +666,7 @@ static bool
msg_to_userspace_nl(const struct xt_pknock_mtinfo *info,
const struct peer *peer, int multicast_group)
{
#if defined(CONFIG_CONNECTOR) || defined(CONFIG_CONNECTOR_MODULE)
struct cn_msg *m;
struct xt_pknock_nl_msg msg;
@@ -685,6 +686,7 @@ msg_to_userspace_nl(const struct xt_pknock_mtinfo *info,
cn_netlink_send(m, multicast_group, GFP_ATOMIC);
kfree(m);
#endif
return true;
}
@@ -1104,6 +1106,12 @@ static struct xt_match xt_pknock_mt_reg __read_mostly = {
static int __init xt_pknock_mt_init(void)
{
#if !defined(CONFIG_CONNECTOR) && !defined(CONFIG_CONNECTOR_MODULE)
if (nl_multicast_group != -1)
pr_info("CONFIG_CONNECTOR not present; "
"netlink messages disabled\n");
#endif
if (gc_expir_time < DEFAULT_GC_EXPIRATION_TIME)
gc_expir_time = DEFAULT_GC_EXPIRATION_TIME;
#ifdef PK_CRYPTO