Re: [systemd-devel] [PATCH] sd-dhcp-client: support non-Ethernet hardware addresses

2014-10-06 Thread Patrik Flykt
On Fri, 2014-10-03 at 10:04 -0500, Dan Williams wrote: sd_dhcp_client_set_mac() does have an 'arp_type' parameter that's cached in the client struct, so that could be changed to: if (client-arp_type == ARPHRD_ETHER) if you'd like. If it's there already, it is a good thing to use. It does

Re: [systemd-devel] [PATCH] sd-dhcp-client: support non-Ethernet hardware addresses

2014-10-03 Thread Patrik Flykt
Hi, On Thu, 2014-10-02 at 20:05 +0200, Tom Gundersen wrote: The DHCPv4 header is the same format no matter what the LL address size, but for non-ethernet the hlen is 0 and the chaddr is zeroed. The BPF is seeded with an hlen of 0 and a valid ETH_ALEN sized buffer of all zeros.

Re: [systemd-devel] [PATCH] sd-dhcp-client: support non-Ethernet hardware addresses

2014-10-03 Thread Patrik Flykt
On Fri, 2014-10-03 at 15:48 +0300, Patrik Flykt wrote: On Fri, 2014-09-26 at 15:15 -0500, Dan Williams wrote: /* RFC2132 section 4.1.1: The client MUST include its hardware address in the ’chaddr’ field, if - necessary for delivery of DHCP reply messages.

Re: [systemd-devel] [PATCH] sd-dhcp-client: support non-Ethernet hardware addresses

2014-10-03 Thread Dan Williams
On Fri, 2014-10-03 at 16:10 +0300, Patrik Flykt wrote: On Fri, 2014-10-03 at 15:48 +0300, Patrik Flykt wrote: On Fri, 2014-09-26 at 15:15 -0500, Dan Williams wrote: /* RFC2132 section 4.1.1: The client MUST include its hardware address in the ’chaddr’ field, if

Re: [systemd-devel] [PATCH] sd-dhcp-client: support non-Ethernet hardware addresses

2014-10-02 Thread Tom Gundersen
On Fri, Sep 26, 2014 at 10:15 PM, Dan Williams d...@redhat.com wrote: Like Infiniband. See RFC 4390 section 2.1 for details on DHCP and Infiniband; chaddr is zeroed, hlen is set to 0, and htype is set to ARPHRD_INFINIBAND because IB hardware addresses are 20 bytes in length. Sorry for taking

Re: [systemd-devel] [PATCH] sd-dhcp-client: support non-Ethernet hardware addresses

2014-10-02 Thread Dan Williams
On Thu, 2014-10-02 at 16:39 +0200, Tom Gundersen wrote: On Fri, Sep 26, 2014 at 10:15 PM, Dan Williams d...@redhat.com wrote: Like Infiniband. See RFC 4390 section 2.1 for details on DHCP and Infiniband; chaddr is zeroed, hlen is set to 0, and htype is set to ARPHRD_INFINIBAND because IB

Re: [systemd-devel] [PATCH] sd-dhcp-client: support non-Ethernet hardware addresses

2014-10-02 Thread Tom Gundersen
On Thu, Oct 2, 2014 at 6:07 PM, Dan Williams d...@redhat.com wrote: On Thu, 2014-10-02 at 16:39 +0200, Tom Gundersen wrote: On Fri, Sep 26, 2014 at 10:15 PM, Dan Williams d...@redhat.com wrote: Like Infiniband. See RFC 4390 section 2.1 for details on DHCP and Infiniband; chaddr is zeroed,

[systemd-devel] [PATCH] sd-dhcp-client: support non-Ethernet hardware addresses

2014-09-26 Thread Dan Williams
Like Infiniband. See RFC 4390 section 2.1 for details on DHCP and Infiniband; chaddr is zeroed, hlen is set to 0, and htype is set to ARPHRD_INFINIBAND because IB hardware addresses are 20 bytes in length. --- src/libsystemd-network/dhcp-internal.h| 10 +++--