diff options
| author | Valient Gough <vgough@pobox.com> | 2011-08-24 15:12:06 +0900 |
|---|---|---|
| committer | Jesse Gross <jesse@nicira.com> | 2011-09-09 19:29:46 -0700 |
| commit | 40a751774f4255d7b6af699547d72e823c0be1e1 (patch) | |
| tree | 678df18ac98a42fdef8c33a98b4246c79fe0f525 /lib | |
| parent | 3544358aa5960b148bc31435a0062e9392530ec2 (diff) | |
| download | openvswitch-40a751774f4255d7b6af699547d72e823c0be1e1.tar.gz | |
datapath: add key support to CAPWAP tunnel
Add tunnel key support to CAPWAP vport. Uses the optional WSI field in a
CAPWAP header to store a 64bit key. It can also be used without keys, in which
case it is backward compatible with the old code. Documentation about the
WSI field format is in CAPWAP.txt.
Signed-off-by: Valient Gough <vgough@pobox.com>
[horms@verge.net.au: Various minor fixes (v4.1)]
Signed-off-by: Simon Horman <horms@verge.net.au>
[jesse: Additional parsing fixes]
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/netdev-vport.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index 15bf8bd16..c4c1e6b8d 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -634,9 +634,9 @@ parse_tunnel_config(const char *name, const char *type, || !strcmp(node->name, "private_key") || !strcmp(node->name, "use_ssl_cert"))) { /* Ignore options not used by the netdev. */ - } else if (is_gre && (!strcmp(node->name, "key") || - !strcmp(node->name, "in_key") || - !strcmp(node->name, "out_key"))) { + } else if (!strcmp(node->name, "key") || + !strcmp(node->name, "in_key") || + !strcmp(node->name, "out_key")) { /* Handled separately below. */ } else { VLOG_WARN("%s: unknown %s argument '%s'", name, type, node->name); @@ -666,10 +666,8 @@ parse_tunnel_config(const char *name, const char *type, } } - if (is_gre) { - set_key(args, "in_key", OVS_TUNNEL_ATTR_IN_KEY, options); - set_key(args, "out_key", OVS_TUNNEL_ATTR_OUT_KEY, options); - } + set_key(args, "in_key", OVS_TUNNEL_ATTR_IN_KEY, options); + set_key(args, "out_key", OVS_TUNNEL_ATTR_OUT_KEY, options); if (!daddr) { VLOG_ERR("%s: %s type requires valid 'remote_ip' argument", |
