diff options
| author | Hans Dedecker | 2020-12-26 20:41:38 +0000 |
|---|---|---|
| committer | Hans Dedecker | 2020-12-26 20:46:18 +0000 |
| commit | eac1961983b8e7a74c494feedcb878170b135072 (patch) | |
| tree | f4c91d0123d4a6c73abd483a247ee42ce0e08077 | |
| parent | 0475e18804dfd9f5601511b6ffc2556efa5a68a7 (diff) | |
| download | odhcp6c-eac1961983b8e7a74c494feedcb878170b135072.tar.gz | |
dhcpv6: fix displaying IA info
Fix using ntohl and make clear if the recieved IA is either an IA_PD or
IA_NA option
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
| -rw-r--r-- | src/dhcpv6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 60c0b24..51b9992 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -883,7 +883,7 @@ int dhcpv6_poll_reconfigure(void) switch (ret) { /* * Only RENEW/REBIND/INFORMATION REQUEST - * messaage transmission can be requested + * message transmission can be requested * by a RECONFIGURE */ case DHCPV6_MSG_RENEW: @@ -1346,7 +1346,7 @@ static unsigned int dhcpv6_parse_ia(void *opt, void *end) if (t1 > t2) return 0; - syslog(LOG_INFO, "IAID %04x T1 %d T2 %d", htonl(ia_hdr->iaid), t1, t2); + syslog(LOG_INFO, "%s %04x T1 %d T2 %d", ntohs(ia_hdr->type) == DHCPV6_OPT_IA_PD ? "IA_PD" : "IA_NA", ntohl(ia_hdr->iaid), t1, t2); // Update address IA dhcpv6_for_each_option(&ia_hdr[1], end, otype, olen, odata) { |