diff options
| author | Tobias Brunner <tobias@strongswan.org> | 2013-06-28 10:29:42 +0200 |
|---|---|---|
| committer | Tobias Brunner <tobias@strongswan.org> | 2013-06-28 15:10:09 +0200 |
| commit | b7b5432ff8cfdcc56a395ffccd899029a6ca676f (patch) | |
| tree | 0976c523d6c68e9567f394810cbc95c4e594ec68 /src/libcharon/plugins | |
| parent | b18a53171537f81e8dc4a094a5368bdd9d3c7e4f (diff) | |
| download | strongswan-b7b5432ff8cfdcc56a395ffccd899029a6ca676f.tar.bz2 strongswan-b7b5432ff8cfdcc56a395ffccd899029a6ca676f.tar.xz | |
stroke: Changed how proto/port are specified in left|rightsubnet
Using a colon as separator conflicts with IPv6 addresses.
Diffstat (limited to 'src/libcharon/plugins')
| -rw-r--r-- | src/libcharon/plugins/stroke/stroke_config.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_config.c b/src/libcharon/plugins/stroke/stroke_config.c index 64af5bb9c..da8d35c40 100644 --- a/src/libcharon/plugins/stroke/stroke_config.c +++ b/src/libcharon/plugins/stroke/stroke_config.c @@ -895,6 +895,13 @@ static bool parse_protoport(char *token, u_int16_t *from_port, struct servent *svc; long int p; + sep = strrchr(token, ']'); + if (!sep) + { + return FALSE; + } + *sep = '\0'; + sep = strchr(token, '/'); if (sep) { /* protocol/port */ @@ -1009,7 +1016,7 @@ static void add_ts(private_stroke_config_t *this, to_port = end->to_port; proto = end->protocol; - pos = strchr(subnet, ':'); + pos = strchr(subnet, '['); if (pos) { *(pos++) = '\0'; |
