conntrackd: cthelper: Add new SLP helper
PATCH 1/1 conntrackd: cthelper: Add new SLP helper
Service Location Protocol (SLP) uses multicast requests for DA (Directory agent) and SA (Service agent) discovery. Replies to these requests are unicast and their source address does not match destination address of the request so that we need a conntrack helper. A kernel helper was submitted back in 2013 but was rejected as userspace helper infrastructure is preferred. This adds an SLP helper to conntrackd.
As the function of SLP helper is the same as what existing mDNS helper does, src/helpers/slp.c is essentially just a copy of src/helpers/mdns.c, except for the default timeout and example usage. As with mDNS helper, there is no NAT support for the time being as that would probably require kernel side changes and certainly further study (and could possibly work only for source NAT).
--- doc/helper/conntrackd.conf | 8 ++++ src/helpers/Makefile.am | 5 +++ src/helpers/slp.c | 87 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 src/helpers/slp.c
doc/helper/conntrackd.conf +8 -0
@@ -96,6 +96,14 @@ Helper { ExpectTimeout 300 } } + Type slp inet udp { + QueueNum 7 + QueueLen 10240 + Policy slp { + ExpectMax 8 + ExpectTimeout 16 + } + } } #
src/helpers/Makefile.am +5 -0
@@ -8,6 +8,7 @@ pkglib_LTLIBRARIES = ct_helper_amanda.la \ ct_helper_tftp.la \ ct_helper_tns.la \ ct_helper_sane.la \ + ct_helper_slp.la \ ct_helper_ssdp.la HELPER_LDFLAGS = -avoid-version -module $(LIBNETFILTER_CONNTRACK_LIBS) @LAZY_LDFLAGS@
@@ -45,6 +46,10 @@ ct_helper_sane_la_SOURCES = sane.c ct_helper_sane_la_LDFLAGS = $(HELPER_LDFLAGS) ct_helper_sane_la_CFLAGS = $(HELPER_CFLAGS) +ct_helper_slp_la_SOURCES = slp.c +ct_helper_slp_la_LDFLAGS = $(HELPER_LDFLAGS) +ct_helper_slp_la_CFLAGS = $(HELPER_CFLAGS) + ct_helper_ssdp_la_SOURCES = ssdp.c ct_helper_ssdp_la_LDFLAGS = $(HELPER_LDFLAGS) ct_helper_ssdp_la_CFLAGS = $(HELPER_CFLAGS)
src/helpers/slp.c new file +87 -0
87 lines not on this page · raw message
Signature · 1 line
2.22.0
Quoted 7 lines · Michal Kubecek
Service Location Protocol (SLP) uses multicast requests for DA (Directory agent) and SA (Service agent) discovery. Replies to these requests are unicast and their source address does not match destination address of the request so that we need a conntrack helper. A kernel helper was submitted back in 2013 but was rejected as userspace helper infrastructure is preferred. This adds an SLP helper to conntrackd.
Quoted 6 lines
As the function of SLP helper is the same as what existing mDNS helper does,
src/helpers/slp.cis essentially just a copy ofsrc/helpers/mdns.c, except for the default timeout and example usage. As with mDNS helper, there is no NAT support for the time being as that would probably require kernel side changes and certainly further study (and could possibly work only for source NAT).
Applied, thanks.