Set PLUTO port variables to 0 in the case of no port restrictions
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 4 Mar 2016 11:52:35 +0000 (12:52 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 4 Mar 2016 11:52:35 +0000 (12:52 +0100)
src/libcharon/plugins/updown/updown_listener.c

index f83be0a..e472a17 100644 (file)
@@ -237,7 +237,7 @@ static char* get_port(traffic_selector_t *me, traffic_selector_t *other,
                from = other->get_from_port(other);
                to   = other->get_to_port(other);
        }
-       if (from == to)
+       if (from == to || (from == 0 && to == 65535))
        {
                snprintf(port_buf, PORT_BUF_LEN, "%u", from);
        }