Set PLUTO port variables to 0 in the case of no port restrictions

This commit is contained in:
Andreas Steffen
2016-03-04 12:52:35 +01:00
parent 5c25780ce0
commit ad82c95f0a
@@ -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);
}