From ad82c95f0a8e2733f9579c8c644baf4685cb5a34 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Fri, 4 Mar 2016 12:52:35 +0100 Subject: [PATCH] Set PLUTO port variables to 0 in the case of no port restrictions --- src/libcharon/plugins/updown/updown_listener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcharon/plugins/updown/updown_listener.c b/src/libcharon/plugins/updown/updown_listener.c index f83be0a6f..e472a178e 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); }