SANE conntrack helper
Subsystems (2)
PATCH 1/1 SANE conntrack helper
Hi,
This is nf_conntrack_sane, a netfilter connection tracking helper module for the SANE protocol used by the 'saned' daemon to make scanners available via network.
The SANE protocol uses separate control & data connections, similar to passive FTP. The helper module is needed to recognize the data connection as RELATED to the control one.
Patrick, this version is ported to the current nf_conntrack changes and I've made the cleanups and fixes you recommended last week.
Signed-off-by Michal Schmidt <[email protected]>
include/linux/netfilter/nf_conntrack_sane.h new file +21 -0
@@ -0,0 +1,21 @@ +#ifndef _NF_CONNTRACK_SANE_H +#define _NF_CONNTRACK_SANE_H +/* SANE tracking. */ + +#ifdef __KERNEL__ + +#define SANE_PORT 6566 + +enum sane_state { +SANE_STATE_NORMAL , +SANE_STATE_START_REQUESTED , +}; + +/* This structure exists only once per master */ +struct nf_ct_sane_master { +enum sane_state state; +}; + +#endif /* __KERNEL__ */ + +#endif /* _NF_CONNTRACK_SANE_H */
include/net/netfilter/nf_conntrack.h +2 -0
@@ -45,6 +45,7 @@ union nf_conntrack_expect_proto {#include <linux/netfilter/nf_conntrack_ftp.h> #include <linux/netfilter/nf_conntrack_pptp.h> #include <linux/netfilter/nf_conntrack_h323.h> +#include <linux/netfilter/nf_conntrack_sane.h> /* per conntrack: application helper private data */ union nf_conntrack_help {
@@ -52,6 +53,7 @@ union nf_conntrack_help {struct nf_ct_ftp_master ct_ftp_info;struct nf_ct_pptp_master ct_pptp_info;struct nf_ct_h323_master ct_h323_info; +struct nf_ct_sane_master ct_sane_info; };#include <linux/types.h>
net/netfilter/Kconfig +13 -0
@@ -236,6 +236,19 @@ config NF_CONNTRACK_PPTP To compile it as a module, choose M here. If unsure, say N. +config NF_CONNTRACK_SANE + tristate "SANE protocol support (EXPERIMENTAL)" + depends on EXPERIMENTAL && NF_CONNTRACK + help + SANE is a protocol for remote access to scanners as implemented + by the 'saned' daemon. Like FTP, it uses separate control and + data connections. + + With this module you can support SANE on a connection tracking + firewall. + + To compile it as a module, choose M here. If unsure, say N. + config NF_CONNTRACK_SIP tristate "SIP protocol support (EXPERIMENTAL)" depends on EXPERIMENTAL && NF_CONNTRACK
net/netfilter/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_NF_CONNTRACK_H323) += nf_conntrack_h323.o obj-$(CONFIG_NF_CONNTRACK_IRC) += nf_conntrack_irc.o obj-$(CONFIG_NF_CONNTRACK_NETBIOS_NS) += nf_conntrack_netbios_ns.o obj-$(CONFIG_NF_CONNTRACK_PPTP) += nf_conntrack_pptp.o +obj-$(CONFIG_NF_CONNTRACK_SANE) += nf_conntrack_sane.o obj-$(CONFIG_NF_CONNTRACK_SIP) += nf_conntrack_sip.o obj-$(CONFIG_NF_CONNTRACK_TFTP) += nf_conntrack_tftp.o
net/netfilter/nf_conntrack_sane.c new file +236 -0
236 lines not on this page · raw message