summaryrefslogtreecommitdiff
path: root/src/libstrongswan/selectors/traffic_selector.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/selectors/traffic_selector.c')
-rw-r--r--src/libstrongswan/selectors/traffic_selector.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstrongswan/selectors/traffic_selector.c b/src/libstrongswan/selectors/traffic_selector.c
index 12f160224..cfd2b029d 100644
--- a/src/libstrongswan/selectors/traffic_selector.c
+++ b/src/libstrongswan/selectors/traffic_selector.c
@@ -2,7 +2,7 @@
* Copyright (C) 2007-2017 Tobias Brunner
* Copyright (C) 2005-2007 Martin Willi
* Copyright (C) 2005 Jan Hutter
- * Hochschule fuer Technik Rapperswil
+ * HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -293,15 +293,16 @@ int traffic_selector_printf_hook(printf_hook_data_t *data,
written += print_in_hook(data, "%d", this->protocol);
}
}
-
- if (has_proto && has_ports)
+ else
{
- written += print_in_hook(data, "/");
+ written += print_in_hook(data, "0");
}
/* build port string */
if (has_ports)
{
+ written += print_in_hook(data, "/");
+
if (this->from_port == this->to_port)
{
struct servent *serv;