[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: udhcpd: HOST_NAME support for static leases
From:       Philippe Jounin <philippe.jounin () orange ! fr>
Date:       2019-05-21 19:44:37
Message-ID: 93f81b2a-493c-d009-b0d9-a081c653b52f () orange ! fr
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello Denys,

That's perfect  !!
Thanks.

Just a question:
In line 69, [optlen = (opts ? 1+1+strnlen(opts, 120) : 0);], you choose 
to limit the hostname to 120 characters.

It seems more than enough, however it this not fully compliant with the 
RFC 2132 and 1035.
RFC 1035 limits the FQDN to 255 characters with labels limited to 63 
chars, while RFC2132 mentions that the HOSTNAME option may contain the 
domain name.

Is it a tradeoff to keep DHCP messages shorter than MTU ?

Best regards,
Philippe


        2.3.4 <https://tools.ietf.org/html/rfc1035#section-2.3.4>. Size
        limits



Various objects and parameters in the DNS have size limits.  They are
listed below.  Some could be easily changed, others are more
fundamental.

labels          63 octets or less
names           255 octets or less



      3.14 <https://tools.ietf.org/html/rfc2132#section-3.14>. Host Name
      Option



    This option specifies the name of the client.  The name may or may
    not be qualified with the local domain name (seesection 3.17  \
<https://tools.ietf.org/html/rfc2132#section-3.17>  for the  preferred way to \
retrieve the domain name).  SeeRFC 1035  <https://tools.ietf.org/html/rfc1035>  for  \
character set restrictions.

    The code for this option is 12, and its minimum length is 1.

     Code   Len                 Host Name
    +-----+-----+-----+-----+-----+-----+-----+-----+--
    |  12 |  n  |  h1 |  h2 |  h3 |  h4 |  h5 |  h6 |  ...
    +-----+-----+-----+-----+-----+-----+-----+-----+--



Le 21/05/2019 à 16:07, Denys Vlasenko a écrit :
> 
> On Mon, May 20, 2019 at 6:30 PM Philippe Jounin 
> <philippe.jounin@orange.fr <mailto:philippe.jounin@orange.fr>> wrote:
> 
> 
> Hello Denys,
> 
> Tested under a debian box: Works as expected with the
> configuration file joined !!
> Targets tried: debian, centOS, cisco routers
> 
> A few very minor remarks:
> - with high verbose level (3v), log_static_leases dumps all
> static leases, but is called for each new static lease. May be log
> should be moved into add_static_lease.
> 
> 
> Done, please try current git.
> 



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel \
antivirus Avast. https://www.avast.com/antivirus


[Attachment #5 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello Denys,</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">That's perfect  !!</div>
    <div class="moz-cite-prefix">Thanks.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Just a question: <br>
    </div>
    <div class="moz-cite-prefix">In line 69, [optlen = (opts ?
      1+1+strnlen(opts, 120) : 0);], you choose to limit the hostname to
      120 characters.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">It seems more than enough, however it
      this not fully compliant with the RFC 2132 and 1035.</div>
    <div class="moz-cite-prefix">RFC 1035 limits the FQDN to 255
      characters with labels limited to 63 chars, while RFC2132 mentions
      that the HOSTNAME option may contain the domain name.<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Is it a tradeoff to keep DHCP messages
      shorter than MTU ?</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Best regards,</div>
    <div class="moz-cite-prefix">Philippe<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">
      <pre class="newpage" style="font-size: 13.3333px; margin-top: 0px; \
margin-bottom: 0px; break-before: page; color: rgb(0, 0, 0); font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration-style: initial; text-decoration-color: initial;"><span class="h4" \
style="line-height: 0pt; display: inline; white-space: pre; font-family: monospace; \
font-size: 1em; font-weight: bold;"><h4 style="line-height: 0pt; display: inline; \
white-space: pre; font-family: monospace; font-size: 1em; font-weight: bold;"><a \
class="selflink" name="section-2.3.4" \
href="https://tools.ietf.org/html/rfc1035#section-2.3.4" style="color: black; \
text-decoration: none;">2.3.4</a>. Size limits</h4></span>

Various objects and parameters in the DNS have size limits.  They are
listed below.  Some could be easily changed, others are more
fundamental.

labels          63 octets or less
names           255 octets or less</pre>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">
      <pre class="newpage" style="font-size: 13.3333px; margin-top: 0px; \
margin-bottom: 0px; break-before: page; color: rgb(0, 0, 0); font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration-style: initial; text-decoration-color: initial;"><span class="h3" \
style="line-height: 0pt; display: inline; white-space: pre; font-family: monospace; \
font-size: 1em; font-weight: bold;"><h3 style="line-height: 0pt; display: inline; \
white-space: pre; font-family: monospace; font-size: 1em; font-weight: bold;"><a \
class="selflink" name="section-3.14" \
href="https://tools.ietf.org/html/rfc2132#section-3.14" style="color: black; \
text-decoration: none;">3.14</a>. Host Name Option</h3></span>

   This option specifies the name of the client.  The name may or may
   not be qualified with the local domain name (see <a \
href="https://tools.ietf.org/html/rfc2132#section-3.17">section 3.17</a> for the  \
preferred way to retrieve the domain name).  See <a \
href="https://tools.ietf.org/html/rfc1035">RFC 1035</a> for  character set \
restrictions.

   The code for this option is 12, and its minimum length is 1.

    Code   Len                 Host Name
   +-----+-----+-----+-----+-----+-----+-----+-----+--
   |  12 |  n  |  h1 |  h2 |  h3 |  h4 |  h5 |  h6 |  ...
   +-----+-----+-----+-----+-----+-----+-----+-----+--</pre>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Le 21/05/2019 à 16:07, Denys Vlasenko a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAK1hOcM0ekb==mGTiTi46p2utntnw6LKdsuO9ZxjLGojpR=QGw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr"><br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Mon, May 20, 2019 at 6:30
            PM Philippe Jounin &lt;<a
              href="mailto:philippe.jounin@orange.fr"
              moz-do-not-send="true">philippe.jounin@orange.fr</a>&gt;
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div bgcolor="#FFFFFF">
              <div class="gmail-m_8928238418457367286moz-cite-prefix">
                <table
                  class="gmail-m_8928238418457367286mail-content-readonly-table"
                  style="margin:0px;padding:0px;border:0px
none;border-spacing:0px;color:rgb(68,68,68);font-family:arial,sans-serif;font-size:12p \
x;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight \
:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white- \
space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"
  width="991" height="14">
                  <tbody style="margin:0px;padding:0px;border:0px none">
                    <tr style="margin:0px;padding:0px;border:0px none">
                      <td style="margin:0px;padding:0px;border:0px
                        none;vertical-align:top"><br>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </div>
              Hello Denys,<br>
              <br>
              Tested under a debian box: Works as expected with the
              configuration file joined !!<br>
              Targets tried: debian, centOS, cisco routers<br>
              <br>
               A few very minor remarks: <br>
                 - with high verbose level (3v), log_static_leases dumps
              all static leases, but is called for each new static
              lease. May be log should be moved into add_static_lease.<br>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>Done, please try current git.</div>
          <br>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
  <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px \
solid #D3D4DE;">  <tr>
      <td style="width: 55px; padding-top: 18px;"><a \
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" \
target="_blank"><img \
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" \
alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>  <td \
style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: \
Arial, Helvetica, sans-serif; line-height: 18px;">Garanti sans virus. <a \
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" \
target="_blank" style="color: #4453ea;">www.avast.com</a> 		</td>  </tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> \
</a></div></body> </html>



_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic