Clean up code.
This commit is contained in:
@@ -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.");
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user