traffic-selector: Always print protocol if either protocol or port is set
authorTobias Brunner <tobias@strongswan.org>
Wed, 11 Apr 2018 10:15:55 +0000 (12:15 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 11 Apr 2018 10:31:31 +0000 (12:31 +0200)
commita36d8097ede6900c60c1affa720c74e1bfeb6975
tree8590426cb9a75754c00abc9989d1ba57ff0be7e5
parent73382f516ec495404f0c403b7944d8e328978bf8
traffic-selector: Always print protocol if either protocol or port is set

This helps to distinguish between port and protocol if only one of them
is set.  If no protocol is set it's printed as 0, if the traffic
selector covers any port (0-65535) the slash that separates the two values
and the port is omitted.
src/libstrongswan/selectors/traffic_selector.c
src/libstrongswan/tests/suites/test_traffic_selector.c