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;
verify("10.1.0.1/32[udp]", "10.1.0.1/32[17]",
traffic_selector_create_from_cidr("10.1.0.1/32", IPPROTO_UDP,
0, 65535));
+ verify("10.1.0.1/32[0/domain]", "10.1.0.1/32[0/53]",
+ traffic_selector_create_from_cidr("10.1.0.1/32", 0,
+ 53, 53));
verify("10.1.0.1/32[udp/1234-1235]", "10.1.0.1/32[17/1234-1235]",
traffic_selector_create_from_cidr("10.1.0.1/32", IPPROTO_UDP,
1234, 1235));
- verify("10.1.0.0/16[OPAQUE]", NULL,
+ verify("10.1.0.0/16[0/OPAQUE]", NULL,
traffic_selector_create_from_cidr("10.1.0.0/16", 0, 65535, 0));
verify(NULL, NULL,