Skip to content

Commit 05243b0

Browse files
authored
Merge pull request sonic-net#99 from mssonicbld/sonicbld/202205-merge
[code sync] Merge code from sonic-net/sonic-buildimage:202205 to 202205
2 parents 75e6e1c + e641e1b commit 05243b0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/dhcpmon/src/dhcp_device.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <arpa/inet.h>
1919
#include <unistd.h>
2020
#include <syslog.h>
21+
#include <inttypes.h>
2122
#include <libexplain/ioctl.h>
2223
#include <linux/filter.h>
2324
#include <netpacket/packet.h>
@@ -303,9 +304,6 @@ static void client_packet_handler(dhcp_device_context_t *context, uint8_t *buffe
303304
offset += dhcp_option[offset + 1] + 2;
304305
}
305306
}
306-
} else {
307-
syslog(LOG_WARNING, "read_callback(%s %s): read length (%ld) is too small to capture DHCP options",
308-
context->intf, dir == DHCP_TX ? "TX" : "RX", buffer_sz);
309307
}
310308
}
311309

@@ -560,7 +558,8 @@ static void dhcp_print_counters(const char *vlan_intf,
560558

561559
syslog(
562560
LOG_NOTICE,
563-
"[%*s-%*s rx/tx] Discover: %*lu/%*lu, Offer: %*lu/%*lu, Request: %*lu/%*lu, ACK: %*lu/%*lu\n",
561+
"[%*s-%*s rx/tx] Discover: %*" PRIu64 "/%*" PRIu64 ", Offer: %*" PRIu64 "/%*" PRIu64
562+
", Request: %*" PRIu64 "/%*" PRIu64 ", ACK: %*" PRIu64 "/%*" PRIu64 "\n",
564563
IF_NAMESIZE, vlan_intf,
565564
(int) strlen(counter_desc[type]), counter_desc[type],
566565
DHCP_COUNTER_WIDTH, counters[DHCP_RX][DHCP_MESSAGE_TYPE_DISCOVER],

0 commit comments

Comments
 (0)