diff --git a/ndhc/options.c b/ndhc/options.c index 17d5ebc..f21a2cb 100644 --- a/ndhc/options.c +++ b/ndhc/options.c @@ -277,7 +277,7 @@ size_t add_option_string(uint8_t *optbuf, size_t buflen, uint8_t *optstr) } /* end position + optstr length + option code/length + end option */ if (end + datalen + 2 + 1 >= buflen) { - log_warning("Option 0x%02x did not fit into the packet!", optstr[0]); + log_warning("add_option_string: No space for option 0x%02x", optstr[0]); return 0; } memcpy(optbuf + end, optstr, datalen + 2); diff --git a/ndhc/packet.c b/ndhc/packet.c index 47abe50..85b2087 100644 --- a/ndhc/packet.c +++ b/ndhc/packet.c @@ -182,6 +182,7 @@ out_fd: out: return -1; } + // Read a packet from a cooked socket. Returns -1 on fatal error, -2 on // transient error. static int get_packet(struct dhcpmsg *packet, int fd) @@ -214,7 +215,7 @@ static inline uint16_t foldcarry(uint32_t v) } // This function is not suitable for summing buffers that are greater than -// 128k-1 bytes in length: failure case will be incorrect checksums via +// 128k bytes in length: failure case will be incorrect checksums via // unsigned overflow, which is a defined operation and is safe. This limit // should not be an issue for IPv4 or IPv6 packet, which are limited to // at most 64k bytes.