Clean up code.

This commit is contained in:
Christian Deacon
2025-03-10 18:04:14 -04:00
parent c88a010aae
commit d5c2413838
2 changed files with 2 additions and 1 deletions

View File

@@ -145,7 +145,7 @@ int main(int argc, char *argv[])
} }
// Check first interface. // Check first interface.
if (cfg.interfaces[0] == NULL) if (!cfg.interfaces[0])
{ {
log_msg(&cfg, 0, 1, "[ERROR] No interface(s) specified in config or CLI override."); log_msg(&cfg, 0, 1, "[ERROR] No interface(s) specified in config or CLI override.");

View File

@@ -49,6 +49,7 @@ int xdp_prog_main(struct xdp_md *ctx)
if (unlikely(eth->h_proto != htons(ETH_P_IP) && eth->h_proto != htons(ETH_P_IPV6))) if (unlikely(eth->h_proto != htons(ETH_P_IP) && eth->h_proto != htons(ETH_P_IPV6)))
{ {
inc_pkt_stats(stats, STATS_TYPE_PASSED); inc_pkt_stats(stats, STATS_TYPE_PASSED);
return XDP_PASS; return XDP_PASS;
} }