Skip to content

Commit

Permalink
Merge pull request #690 from AltraMayor/ubu22
Browse files Browse the repository at this point in the history
Prepare codebase for Ubuntu 24.04
  • Loading branch information
AltraMayor authored Jun 10, 2024
2 parents 8e13d4d + 36c8d99 commit b38a748
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/gatekeeper_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ enum {
* Need forward declaration because acl_cb_func and struct gatekeeper_if
* are circularly defined.
*/
struct gatekeeper_if *iface;
struct gatekeeper_if;
typedef int (*acl_cb_func)(struct rte_mbuf **pkts, unsigned int num_pkts,
struct gatekeeper_if *iface);
/* Format of function called when no rule matches in the IPv6 ACL. */
Expand Down
3 changes: 3 additions & 0 deletions lib/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,10 @@ log_if_name(char *if_name, size_t len, const struct gatekeeper_if *iface,
}
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
strncpy(if_name, iface->name, len);
#pragma GCC diagnostic pop
if (unlikely(if_name[len - 1] != '\0')) {
G_LOG(CRIT, "%s(%s/%u): bug: len = %lu < strlen(iface->name) = %lu\n",
__func__, iface->name, port_id,
Expand Down

0 comments on commit b38a748

Please sign in to comment.