aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/encoding
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-03-01 11:27:12 +0100
committerMartin Willi <martin@revosec.ch>2013-03-01 11:27:12 +0100
commita36b49f3cb941869127bccd0a30fd1ff4905dc82 (patch)
tree090178e3ed9770feedde5d52a5eb53b930c15c97 /src/libcharon/encoding
parent53fcc70acc553c7f44c43d452ee73b5ac7c1b484 (diff)
parentb443fa61231357a4c09f0bfed22be05727427cda (diff)
downloadstrongswan-a36b49f3cb941869127bccd0a30fd1ff4905dc82.tar.bz2
strongswan-a36b49f3cb941869127bccd0a30fd1ff4905dc82.tar.xz
Merge branch 'opaque-ports'
Adds a %opaque port option and support for port ranges in left/rightprotoport. Currently not supported by any of our kernel backends.
Diffstat (limited to 'src/libcharon/encoding')
-rw-r--r--src/libcharon/encoding/payloads/traffic_selector_substructure.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcharon/encoding/payloads/traffic_selector_substructure.c b/src/libcharon/encoding/payloads/traffic_selector_substructure.c
index 15f791b95..334823db9 100644
--- a/src/libcharon/encoding/payloads/traffic_selector_substructure.c
+++ b/src/libcharon/encoding/payloads/traffic_selector_substructure.c
@@ -114,7 +114,11 @@ METHOD(payload_t, verify, status_t,
{
if (this->start_port > this->end_port)
{
- return FAILED;
+ /* OPAQUE ports are the only exception */
+ if (this->start_port != 0xffff && this->end_port != 0)
+ {
+ return FAILED;
+ }
}
switch (this->ts_type)
{