[LEDE-DEV] [PATCH 1/3] Handle SRV questions

Philip Prindeville philipp_subx at redfish-solutions.com
Wed Apr 26 14:56:54 PDT 2017


> On Apr 26, 2017, at 3:45 AM, Cristian Morales Vega <cristian at samknows.com> wrote:
> 
> Signed-off-by: Cristian Morales Vega <cristian at samknows.com>
> ---
> dns.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
> 
> diff --git a/dns.c b/dns.c
> index d384f58..61ea8e3 100644
> --- a/dns.c
> +++ b/dns.c
> @@ -390,6 +390,20 @@ parse_question(struct interface *iface, struct sockaddr *from, char *name, struc
> 		}
> 		break;
> 
> +	case TYPE_SRV:
> +		{
> +		/* First dot separates instance name from the rest */
> +		char *dot = strchr(name, '.');
> +		/* Length of queried instance */
> +		size_t len = dot ? dot - name : 0;
> +
> +		/* Make sure it's query for the instance name we use */
> +		if (len && len == strlen(mdns_hostname) &&
> +		    !strncmp(name, mdns_hostname, len))
> +			service_reply(iface, to, dot + 1, announce_ttl);
> +		}
> +		break;
> +
> 	case TYPE_AAAA:
> 	case TYPE_A:
> 		host = strstr(name, ".local”);


Uh…  What package is this for?

-Philip





More information about the Lede-dev mailing list