Commit 89e061a9 authored by Simon Morlat's avatar Simon Morlat

fix incomplete previous bugfix (tpn_proto may be NULL or "*")

parent 9c9c5873
......@@ -4638,15 +4638,15 @@ tport_t *tport_by_name(tport_t const *tp, tp_name_t const *tpn)
family = AF_INET;
else
family = 0;
if (proto && strcmp(proto, tpn_any) == 0)
proto = NULL;
if ((family != 0 || tpn->tpn_port != 0) && proto == NULL){
/*according to https://tools.ietf.org/html/rfc3263#page-6 4. Selecting a transport protocol
* When no transport is specified, if ip address is numeric or port number is specified, then use UDP*/
proto = "udp";
}
if (proto && strcmp(proto, tpn_any) == 0)
proto = NULL;
if (!ident && !proto && !family && !comp)
return (tport_t *)self; /* Anything goes */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment