datapath: Allow attaching helpers to ct action
authorJoe Stringer <joestringer@nicira.com>
Thu, 3 Dec 2015 07:53:53 +0000 (23:53 -0800)
committerJoe Stringer <joe@ovn.org>
Fri, 4 Dec 2015 01:17:25 +0000 (17:17 -0800)
commit11251c170d926411026aa371413ac91803652216
tree2ae32bcb03d8c02fd3dd226462745185653e9fc4
parent038e34abaa317a896d03187ac74ef252ba3d2760
datapath: Allow attaching helpers to ct action

Add support for using conntrack helpers to assist protocol detection.
The new OVS_CT_ATTR_HELPER attribute of the CT action specifies a helper
to be used for this connection. If no helper is specified, then helpers
will be automatically applied as per the sysctl configuration of
net.netfilter.nf_conntrack_helper.

The helper may be specified as part of the conntrack action, eg:
ct(helper=ftp). Initial packets for related connections should be
committed to allow later packets for the flow to be considered
established.

Example ovs-ofctl flows allowing FTP connections from ports 1->2:
in_port=1,tcp,action=ct(helper=ftp,commit),2
in_port=2,tcp,ct_state=-trk,action=ct(recirc)
in_port=2,tcp,ct_state=+trk-new+est,action=1
in_port=2,tcp,ct_state=+trk+rel,action=1

Upstream: cae3a26 "openvswitch: Allow attaching helpers to ct action"
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/conntrack.c