Networking

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • problem with size of time_t on several 64bit ARCHS/OSes

    5 answers - 3259 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    PGP SIGNED MESSAGE
    Hash: SHA1
    Hi,
    since dhcp-3.0.4 there are serious problems with the size of PTIN 51 (IP
    address lease time) with dhcpd running on !32bit ARCHS.
    Some tests showed the following for 3.0.4 on an amd64 system running
    FreeBSD:
    PTIN: 51 ( 8) IP address lease time 86400 (24h)
    This is for the same system running dhcpd 3.0.3:
    PTIN: 51 ( 4) IP address lease time 86400 (24h)
    So there is an obvious difference between the IP address lease time in
    the DHCPFFER between 3.0.3 and 3.0.4 on this ARCH/S combination.
    I've investigated this a little bit further and came to the following
    list, verified by using sizeof(time_t) on several ARCHS and Ses
    S| ARCH| sizeof(time_t)
    - ++
    FreeBSD| i386| 4
    FreeBSD| pc98| 4
    FreeBSD| alpha| 4
    FreeBSD| powerpc| 4
    FreeBSD| amd64| 8 !
    FreeBSD| ia64| 8 !
    FreeBSD| sparc64| 8 !
    DragonflyBSD| i386| 4
    DragonflyBSD| amd64| 4
    NetBSD| i386| 4
    NetBSD| amd64| 4
    Linux-2.6.16.13| i386| 4
    Linux-2.6.16.13| x64_64| 8 !
    SF1 V4.0| alpha| 4
    SF1 V5.1| alpha| 4
    SS 5.9| sparc64| 4
    MS-X| powerpc| 4
    Unfortunately, I've no access to other ARCH/S combinations, there maybe
    more with 8 bytes length of time_t.
    The main fact is, that the current ISC dhcp distribution does not deal
    with the different size of time_t on the various ARCH/S combinations.
    I tested several clients with the server running on FreeBSD amd64 using
    dhcpd version 3.0.4, to see how the clients do react on the wrong size of
    the PTIN 51 (8 bytes).
    I got no problems with clients running on various Linux distributions and
    clients used on the *BSD systems.
    Unfortunately, Windows (at least XP) seems to be very strict and ignores
    the DHCPFFER completely.
    As a very quick hack, i changed the "includes/cf/freebsd.h" file from
    #define TIME time_t
    to
    #define TIME u_int32_t
    and recompiled everything.
    Beside some warnings during the build, because gmtime() and time() expect
    64bit time_t arguments and get the 32bit u_int32_t now, everything went
    fine.
    I tried the Windows XP clients again and now the patched dhcpd offered the
    IP address lease time with a length of 4 bytes, and XP is happy again.
    I've not tested how this will affect the failover situation between
    systems with 4 bytes and 8 bytes length of time_t. It may be broken too,
    but I'm unsure.
    The main question for me is now, should the S vendors fix their
    definition of time_t (not sure what PSIX says about the size of time_t)
    or should the different size be handled in th ISC dhcp distribution?
    At least the RFC is very clear about the size of PTIN 51
    - -snip
    The time is in units of seconds, and is specified as a 32-bit
    unsigned integer.
    The code for this option is 51, and its length is 4.
    Code Len Lease Time
    | 51 | 4 | t1 | t2 | t3 | t4 |
    - -snip
    Any comments are much appreciated.
    regards
    Joerg
    - --
    The beginning is the most important part of the work.
    -Plato
    PGP SIGNATURE
    Version: GnuPG v1.4.3 (FreeBSD)
    dJDtAs1d3pobZxp9Ub0Gqo8=
    =2d7r
    PGP SIGNATURE
  • No.1 | | 737 bytes | |

    Mon, May 15, 2006 at 08:17:21PM +0200, Joerg Pulz wrote:
    So there is an obvious difference between the IP address lease time in
    the DHCPFFER between 3.0.3 and 3.0.4 on this ARCH/S combination.

    revision 1.202.2.31
    date: 2005/10/10 16:45:39; author: dhankins; state: Exp; lines: +2 -2
    - Several minor bugs, largely relating to treating 8-byte time values as
    4-byte entities, have been repaired after careful review of the FreeBSD
    ports collection's patch set. Thanks to the nameless entities who have
    contributed to the FreeBSD ports. [ISC-bugs #13722]

    Well, it appears my review of those changes wasn't complete enough.

    Looks like this is a good enough of a reason for a 3.0.5 beta.
  • No.2 | | 256 bytes | |

    --
    Brent L. Bates (UNIX Sys. Admin.)
    M.S. 912Phone:(757) 865-1400, x204
    NASA Langley Research Center FAX:(757) 865-8177
    Hampton, Virginia 23681-0001
    Email: B.L.BATES (AT) larc (DOT) nasa.govhttp://www.vigyan.com/~blbates/
  • No.3 | | 1529 bytes | |

    PGP SIGNED MESSAGE
    Hash: SHA1

    Mon, 15 May 2006, David W. Hankins wrote:

    Mon, May 15, 2006 at 08:17:21PM +0200, Joerg Pulz wrote:
    >So there is an obvious difference between the IP address lease time in
    >the DHCPFFER between 3.0.3 and 3.0.4 on this ARCH/S combination.
    >

    revision 1.202.2.31
    date: 2005/10/10 16:45:39; author: dhankins; state: Exp; lines: +2 -2
    - Several minor bugs, largely relating to treating 8-byte time values as
    4-byte entities, have been repaired after careful review of the FreeBSD
    ports collection's patch set. Thanks to the nameless entities who have
    contributed to the FreeBSD ports. [ISC-bugs #13722]

    Well, it appears my review of those changes wasn't complete enough.

    Looks like this is a good enough of a reason for a 3.0.5 beta.

    David,

    i noticed the above text in the RELNTES.

    If you have a patch, which you want to get tested, i have access to amd64,
    ia64 and sparc64 machines running FreeBSD.
    Linux on x86_64 and ia64 is also available in my pool, so i can check
    these too.
    Just send me any patch you have to fix this issue and i will give it a try
    to make sure that you roll out a functional beta, if you want to release
    one.

    Thanks a lot
    Joerg
    - --
    The beginning is the most important part of the work.
    -Plato
    PGP SIGNATURE
    Version: GnuPG v1.4.3 (FreeBSD)

    uon9Z7F/inlnCA0tScTHIWM=
    =4fw3
    PGP SIGNATURE
  • No.4 | | 1190 bytes | |

    Mon, May 15, 2006 at 10:44:02PM +0200, Joerg Pulz wrote:
    i noticed the above text in the RELNTES.

    It looks to be a fix to client behaviour that should have sent up red
    flags over server behaviour but didn't (the client literally passes
    &expiry to gmtime()).

    The reason we never noticed in FreeBSD /usr/ports is probably because
    the client and sever are never built form the same sources (and the
    patch I drew this from was probably in the client's tree).

    If you have a patch, which you want to get tested, i have access to amd64,
    ia64 and sparc64 machines running FreeBSD.
    Linux on x86_64 and ia64 is also available in my pool, so i can check
    these too.
    Just send me any patch you have to fix this issue and i will give it a try
    to make sure that you roll out a functional beta, if you want to release
    one.

    I've created a ticket on dhcp-bugs (AT) isc (DOT) org on this, the first mail you'll
    get from it will likely be about a patch.

    I'm not sure atm if there will be a 3.0.5 soon or in a few weeks, but
    due to the severity of this, I will likely distribute the patch to
    anyone who asks.
  • No.5 | | 452 bytes | |

    Mon, May 15, 2006 at 02:45:55PM -0700, David W. Hankins wrote:

    I'm not sure atm if there will be a 3.0.5 soon or in a few weeks, but
    due to the severity of this, I will likely distribute the patch to
    anyone who asks.

    I'm asking :-)

    3.0.4 just hit our testing distribution, where it'll be causing breakage for
    a larger userbase, so I'd like to get it fixed ASAP.

    regards

    Andrew

Re: problem with size of time_t on several 64bit ARCHS/OSes


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Networking"

EMSDN.COM