From: Andreas Steffen Date: Fri, 4 Mar 2016 11:52:35 +0000 (+0100) Subject: Set PLUTO port variables to 0 in the case of no port restrictions X-Git-Tag: 5.4.0dr8~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad82c95f0a8e2733f9579c8c644baf4685cb5a34;p=thirdparty%2Fstrongswan.git Set PLUTO port variables to 0 in the case of no port restrictions --- diff --git a/src/libcharon/plugins/updown/updown_listener.c b/src/libcharon/plugins/updown/updown_listener.c index f83be0a6fc..e472a178ef 100644 --- a/src/libcharon/plugins/updown/updown_listener.c +++ b/src/libcharon/plugins/updown/updown_listener.c @@ -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); }