On Tue, 01.07.14 10:37, Eugene Yakubovich (eugene.yakubov...@coreos.com) wrote:
> >
> > > +/* make sure the hostname is not "localhost" */
> > > +static bool is_localhost(const char *hostname) {
> > > +char *hostend;
> > > +
> > > +assert(hostname);
> > > +
> > > +hostend =
>
> > +/* make sure the hostname is not "localhost" */
> > +static bool is_localhost(const char *hostname) {
> > +char *hostend;
> > +
> > +assert(hostname);
> > +
> > +hostend = strchr(hostname, '.');
> > +if (hostend)
> > +return strneq(hostname, "l
On Mon, 30.06.14 16:52, Eugene Yakubovich (eugene.yakubov...@coreos.com) wrote:
> uint32_t xid;
> usec_t start_time;
> uint16_t secs;
> @@ -178,6 +179,20 @@ int sd_dhcp_client_set_mac(sd_dhcp_client *client,
> return 0;
> }
>
> +int sd_dhcp_client_set_hostnam
On Tue, Jul 1, 2014 at 2:36 AM, Eugene Yakubovich
wrote:
> On Mon, Jun 30, 2014 at 5:09 PM, Greg KH wrote:
>>
>> > +/* make sure the hostname is not "localhost" */
>> > +static bool is_localhost(const char *hostname) {
>> > +char *hostend;
>> > +
>> > +assert(hostname);
>>
>> You
On Tue, Jul 1, 2014 at 1:52 AM, Eugene Yakubovich
wrote:
> Send hostname (option 12) in DISCOVER and REQUEST messages so the
> DHCP server could use it to register with dynamic DNS and such.
Nice!
A couple of minor nits below. Apart from that, could you add a config
option to make this opt-out (
On Mon, Jun 30, 2014 at 5:09 PM, Greg KH wrote:
> > +/* make sure the hostname is not "localhost" */
> > +static bool is_localhost(const char *hostname) {
> > +char *hostend;
> > +
> > +assert(hostname);
>
> You only call this in one place, with an array on the stack, so it can
>
On Mon, Jun 30, 2014 at 04:52:21PM -0700, Eugene Yakubovich wrote:
> Send hostname (option 12) in DISCOVER and REQUEST messages so the
> DHCP server could use it to register with dynamic DNS and such.
> ---
> src/libsystemd-network/sd-dhcp-client.c | 35
> +
> src/
Send hostname (option 12) in DISCOVER and REQUEST messages so the
DHCP server could use it to register with dynamic DNS and such.
---
src/libsystemd-network/sd-dhcp-client.c | 35 +
src/network/networkd-link.c | 26
src/systemd/s