Skip to content

Commit

Permalink
Merge pull request #99 from mssonicbld/sonicbld/202205-merge
Browse files Browse the repository at this point in the history
[code sync] Merge code from sonic-net/sonic-buildimage:202205 to 202205
  • Loading branch information
mssonicbld authored Sep 6, 2023
2 parents 75e6e1c + e641e1b commit 05243b0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/dhcpmon/src/dhcp_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <arpa/inet.h>
#include <unistd.h>
#include <syslog.h>
#include <inttypes.h>
#include <libexplain/ioctl.h>
#include <linux/filter.h>
#include <netpacket/packet.h>
Expand Down Expand Up @@ -303,9 +304,6 @@ static void client_packet_handler(dhcp_device_context_t *context, uint8_t *buffe
offset += dhcp_option[offset + 1] + 2;
}
}
} else {
syslog(LOG_WARNING, "read_callback(%s %s): read length (%ld) is too small to capture DHCP options",
context->intf, dir == DHCP_TX ? "TX" : "RX", buffer_sz);
}
}

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

syslog(
LOG_NOTICE,
"[%*s-%*s rx/tx] Discover: %*lu/%*lu, Offer: %*lu/%*lu, Request: %*lu/%*lu, ACK: %*lu/%*lu\n",
"[%*s-%*s rx/tx] Discover: %*" PRIu64 "/%*" PRIu64 ", Offer: %*" PRIu64 "/%*" PRIu64
", Request: %*" PRIu64 "/%*" PRIu64 ", ACK: %*" PRIu64 "/%*" PRIu64 "\n",
IF_NAMESIZE, vlan_intf,
(int) strlen(counter_desc[type]), counter_desc[type],
DHCP_COUNTER_WIDTH, counters[DHCP_RX][DHCP_MESSAGE_TYPE_DISCOVER],
Expand Down

0 comments on commit 05243b0

Please sign in to comment.