Print all decoded TLVs, not just the first one.
authorAlan T. DeKok <aland@freeradius.org>
Tue, 20 Jul 2010 14:29:13 +0000 (16:29 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 20 Jul 2010 14:30:55 +0000 (16:30 +0200)
src/lib/dhcp.c

index 9f12f60..84a3a65 100644 (file)
@@ -707,9 +707,11 @@ int fr_dhcp_decode(RADIUS_PACKET *packet)
                                        return -1;
                        }
 
-                       debug_pair(vp);
                        *tail = vp;
-                       while (*tail) tail = &(*tail)->next;
+                       while (*tail) {
+                               debug_pair(*tail);
+                               tail = &(*tail)->next;
+                       }
                        p += alen;
                } /* loop over array entries */
        } /* loop over the entire packet */
@@ -1347,7 +1349,6 @@ int fr_dhcp_encode(RADIUS_PACKET *packet, RADIUS_PACKET *original)
        vp = packet->vps;
        while (vp) {
                int num_entries = 1;
-               
                VALUE_PAIR *same;
                uint8_t *plength, *pattr;