]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Pedantic change
authorRoy Marples <roy@marples.name>
Wed, 4 Dec 2013 13:21:45 +0000 (13:21 +0000)
committerRoy Marples <roy@marples.name>
Wed, 4 Dec 2013 13:21:45 +0000 (13:21 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index db70d197229ec90d2e2944028a1369de284b99cd..4a628687757f9088aafac08fe4812643c86027b0 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -1320,7 +1320,7 @@ dhcp6_findna(struct interface *ifp, const uint8_t *iaid,
        while ((o = dhcp6_findoption(D6_OPTION_IA_ADDR, d, l))) {
                l -= ((const uint8_t *)o - d);
                d += ((const uint8_t *)o - d);
-               u32 = htons(o->len);
+               u32 = ntohs(o->len);
                l -= sizeof(*o) + u32;
                d += sizeof(*o) + u32;
                if (u32 < 24) {
@@ -1408,7 +1408,7 @@ dhcp6_findpd(struct interface *ifp, const uint8_t *iaid,
        while ((o = dhcp6_findoption(D6_OPTION_IAPREFIX, d, l))) {
                l -= ((const uint8_t *)o - d);
                d += ((const uint8_t *)o - d);
-               u32 = htons(o->len);
+               u32 = ntohs(o->len);
                l -= sizeof(*o) + u32;
                d += sizeof(*o) + u32;
                if (u32 < 25) {
@@ -1492,7 +1492,7 @@ dhcp6_findia(struct interface *ifp, const uint8_t *d, size_t l,
        while ((o = dhcp6_findoption(ifo->ia_type, d, l))) {
                l -= ((const uint8_t *)o - d);
                d += ((const uint8_t *)o - d);
-               ol = htons(o->len);
+               ol = ntohs(o->len);
                l -= sizeof(*o) + ol;
                d += sizeof(*o) + ol;
                u32 = ifo->ia_type == D6_OPTION_IA_TA ? 4 : 12;