Re: r299512 breaks dhclient on some networks

From: Conrad Meyer <cem_at_FreeBSD.org>
Date: Wed, 18 May 2016 16:49:10 -0700
Hey Ian,

r299512 incorrectly encoded client identifiers because I misunderstood
the intent of the sizeof()-scaled client_id.  I reverted that change
and replaced it with r300174, which I believe fixes the first overrun
more correctly.

(Coverity may still complain about CID 1305550, but I don't believe
it's valid for 'hlen' to exceed sizeof(hw_addr.haddr).)

Thanks,
Conrad

On Wed, May 18, 2016 at 3:49 PM, Ian FREISLICH
<ian.freislich_at_capeaugusta.com> wrote:
> Hi
>
> I cannot for the life of me figure out why the change in r299512 breaks
> DHCP on one network I use but not on another network.
>
> The only clue I can find is that the request whose response is ignored
> has the following client ID:
> 1:6:0:22:5f:70:a1:df
>
> The request whose response is use has this client ID:
> 1:0:22:5f:70:a1:df
>
> Here's a dhcpdump of the request/offer that gets ignored.
>
> ---------------------------------------------------------------------------
>
>   TIME: 2016-05-18 18:46:39.134
>     IP: 0.0.0.0 (00:22:5f:70:a1:df) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
>     OP: 1 (BOOTPREQUEST)
>  HTYPE: 1 (Ethernet)
>   HLEN: 6
>   HOPS: 0
>    XID: 92a34fc3
>   SECS: 0
>  FLAGS: 0
> CIADDR: 0.0.0.0
> YIADDR: 0.0.0.0
> SIADDR: 0.0.0.0
> GIADDR: 0.0.0.0
> CHADDR: 00:22:5f:70:a1:df:00:00:00:00:00:00:00:00:00:00
>  SNAME: .
>  FNAME: .
> OPTION:  53 (  1) DHCP message type         1 (DHCPDISCOVER)
> OPTION:  61 (  8) Client-identifier         01:06:00:22:5f:70:a1:df
> OPTION:  12 (  3) Host name                 zen
> OPTION:  55 (  9) Parameter Request List      1 (Subnet mask)
>                                              28 (Broadcast address)
>                                               2 (Time offset)
>                                             121 (Classless Static Route)
>                                               3 (Routers)
>                                              15 (Domainname)
>                                               6 (DNS server)
>                                              12 (Host name)
>                                             119 (Domain Search)
>
> ---------------------------------------------------------------------------
>
>   TIME: 2016-05-18 18:46:39.134
>     IP: 10.0.0.1 (4c:5e:0c:62:4f:82) > 10.0.0.80 (00:22:5f:70:a1:df)
>     OP: 2 (BOOTPREPLY)
>  HTYPE: 1 (Ethernet)
>   HLEN: 6
>   HOPS: 0
>    XID: 92a34fc3
>   SECS: 0
>  FLAGS: 0
> CIADDR: 0.0.0.0
> YIADDR: 10.0.0.80
> SIADDR: 10.0.0.1
> GIADDR: 0.0.0.0
> CHADDR: 00:22:5f:70:a1:df:00:00:00:00:00:00:00:00:00:00
>  SNAME: .
>  FNAME: .
> OPTION:  53 (  1) DHCP message type         2 (DHCPOFFER)
> OPTION:  54 (  4) Server identifier         10.0.0.1
> OPTION:  51 (  4) IP address leasetime      259200 (3d)
> OPTION:   1 (  4) Subnet mask               255.255.255.0
> OPTION:   3 (  4) Routers                   10.0.0.1
> OPTION:   6 (  4) DNS server                10.0.0.1
> ---------------------------------------------------------------------------
>
>
> And here's the request/offer that works (with the r299512 backed out)
>
> ---------------------------------------------------------------------------
>
>   TIME: 2016-05-18 18:35:33.817
>     IP: 10.0.0.220 (00:22:5f:70:a1:df) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
>     OP: 1 (BOOTPREQUEST)
>  HTYPE: 1 (Ethernet)
>   HLEN: 6
>   HOPS: 0
>    XID: 866cfd85
>   SECS: 4
>  FLAGS: 0
> CIADDR: 0.0.0.0
> YIADDR: 0.0.0.0
> SIADDR: 0.0.0.0
> GIADDR: 0.0.0.0
> CHADDR: 00:22:5f:70:a1:df:00:00:00:00:00:00:00:00:00:00
>  SNAME: .
>  FNAME: .
> OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
> OPTION:  50 (  4) Request IP address        10.0.0.220
> OPTION:  61 (  7) Client-identifier         01:00:22:5f:70:a1:df
> OPTION:  12 (  3) Host name                 zen
> OPTION:  55 (  9) Parameter Request List      1 (Subnet mask)
>                                              28 (Broadcast address)
>                                               2 (Time offset)
>                                             121 (Classless Static Route)
>                                               3 (Routers)
>                                              15 (Domainname)
>                                               6 (DNS server)
>                                              12 (Host name)
>                                             119 (Domain Search)
>
> ---------------------------------------------------------------------------
>
>   TIME: 2016-05-18 18:35:33.817
>     IP: 10.0.0.1 (4c:5e:0c:62:4f:82) > 10.0.0.220 (00:22:5f:70:a1:df)
>     OP: 2 (BOOTPREPLY)
>  HTYPE: 1 (Ethernet)
>   HLEN: 6
>   HOPS: 0
>    XID: 866cfd85
>   SECS: 0
>  FLAGS: 0
> CIADDR: 0.0.0.0
> YIADDR: 10.0.0.220
> SIADDR: 10.0.0.1
> GIADDR: 0.0.0.0
> CHADDR: 00:22:5f:70:a1:df:00:00:00:00:00:00:00:00:00:00
>  SNAME: .
>  FNAME: .
> OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
> OPTION:  54 (  4) Server identifier         10.0.0.1
> OPTION:  51 (  4) IP address leasetime      259200 (3d)
> OPTION:   1 (  4) Subnet mask               255.255.255.0
> OPTION:   3 (  4) Routers                   10.0.0.1
> OPTION:   6 (  4) DNS server                10.0.0.1
> ---------------------------------------------------------------------------
>
>
>
> --
> Ian Freislich
>
>
> --
>
>
> Cape Augusta Digital Properties, LLC a Cape Augusta Company
>
> *Breach of confidentiality & accidental breach of confidentiality *
>
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify the system manager.
> This message contains confidential information and is intended only for the
> individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and
> delete this e-mail from your system. If you are not the intended recipient
> you are notified that disclosing, copying, distributing or taking any
> action in reliance on the contents of this information is strictly
> prohibited.
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Wed May 18 2016 - 21:56:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:05 UTC