Changing Avahi Hostname Default

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing Avahi Hostname Default

Samba - samba-technical mailing list
Hi everyone,
   With the recent patch to support time machine being merged I would
like to revisit the configuration of the hostname for Avahi. Currently
the Avahi registration code calls lp_netbios_name() to set the service
name that is being registered to the netbios name. This is typically
the hostname in all capitals.

The DNS-SD code, although broken for a while according to Omri, sets
the value for the service name to NULL which has the effect of using
the system hostname but in the correct case.

I would like to submit a patch that either changes the Avahi code to
call avahi_client_get_host_name to get the hostname from the Avahi
server or to add a configuration option to use either
lp_netbios_name() or avahi_client_get_host_name (maybe "multicast dns
name = avahi|netbios"). I wanted to see if anyone had strong
preferences on which route to go down though.

My personal thought is to change it to just call
avahi_client_get_host_name which would allow users to change the name
the service gets published on in their Avahi server configuration.

Thanks,
Kevin Anderson

Reply | Threaded
Open this post in threaded view
|

Re: Changing Avahi Hostname Default

Samba - samba-technical mailing list
Hi Kevin,

On Fri, Oct 06, 2017 at 10:53:24PM -0400, Kevin Anderson via samba-technical wrote:
>    With the recent patch to support time machine being merged I would
> like to revisit the configuration of the hostname for Avahi. Currently
> the Avahi registration code calls lp_netbios_name() to set the service
> name that is being registered to the netbios name. This is typically
> the hostname in all capitals.

Which is really ugly.

> The DNS-SD code, although broken for a while according to Omri, sets
> the value for the service name to NULL which has the effect of using
> the system hostname but in the correct case.
>
> I would like to submit a patch that either changes the Avahi code to
> call avahi_client_get_host_name to get the hostname from the Avahi
> server or to add a configuration option to use either
> lp_netbios_name() or avahi_client_get_host_name (maybe "multicast dns
> name = avahi|netbios"). I wanted to see if anyone had strong
> preferences on which route to go down though.
>
> My personal thought is to change it to just call
> avahi_client_get_host_name which would allow users to change the name
> the service gets published on in their Avahi server configuration.

generally makes sense.

What about

  mdns name = mdns | netbios

Using the generic "mdns" instead of "avahi" would work for dns-sd as well in
case someone is interested in that.

Thoughts?

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/

Reply | Threaded
Open this post in threaded view
|

Fwd: Changing Avahi Hostname Default

Samba - samba-technical mailing list
(Resending because I forgot to send to the list)

Hi Ralph,

>
> generally makes sense.
>
> What about
>
>   mdns name = mdns | netbios
>
> Using the generic "mdns" instead of "avahi" would work for dns-sd as well in
> case someone is interested in that.
>
> Thoughts?

That seems fine to me. I'll work on a patch that implements this. Do you want
the default to be netbios to match the current implementation or is it OK to
change the default to mdns?


-Kevin Anderson

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Changing Avahi Hostname Default

Samba - samba-technical mailing list
On Mon, Nov 06, 2017 at 09:28:00PM -0500, Kevin Anderson wrote:

> > generally makes sense.
> >
> > What about
> >
> >   mdns name = mdns | netbios
> >
> > Using the generic "mdns" instead of "avahi" would work for dns-sd as well in
> > case someone is interested in that.
> >
> > Thoughts?
>
> That seems fine to me. I'll work on a patch that implements this. Do you want
> the default to be netbios to match the current implementation or is it OK to
> change the default to mdns?

I guess we have to keep the default, not sure. Jeremy? metze? Volker?

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/