aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.c
diff options
context:
space:
mode:
authorJoe Stringer <joe@wand.net.nz>2013-08-22 12:30:48 -0700
committerJesse Gross <jesse@nicira.com>2013-08-26 14:03:13 -0700
commita175a723301a8a4a9fedf9ce5b8ca586e7a97b40 (patch)
treedcf29aa0043498e2e6ef231c38873345a21a7eff /net/openvswitch/datapath.c
parentnet: Add NEXTHDR_SCTP to ipv6.h (diff)
downloadlinux-dev-a175a723301a8a4a9fedf9ce5b8ca586e7a97b40.tar.xz
linux-dev-a175a723301a8a4a9fedf9ce5b8ca586e7a97b40.zip
openvswitch: Add SCTP support
This patch adds support for rewriting SCTP src,dst ports similar to the functionality already available for TCP/UDP. Rewriting SCTP ports is expensive due to double-recalculation of the SCTP checksums; this is performed to ensure that packets traversing OVS with invalid checksums will continue to the destination with any checksum corruption intact. Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Joe Stringer <joe@wand.net.nz> Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r--net/openvswitch/datapath.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index d29cd9aa4a67..2aa13bd7f2b2 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -712,6 +712,12 @@ static int validate_set(const struct nlattr *a,
return validate_tp_port(flow_key);
+ case OVS_KEY_ATTR_SCTP:
+ if (flow_key->ip.proto != IPPROTO_SCTP)
+ return -EINVAL;
+
+ return validate_tp_port(flow_key);
+
default:
return -EINVAL;
}