From 36cf3e162d8ca62a573f7b7989a9ec5b50ebba8c Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 20 May 2021 14:26:41 +0000 Subject: [PATCH] Satisfy BPF verifier with port swhich it can't prove are init'd values --- xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdp.c b/xdp.c index 8f73d80..a32f605 100644 --- a/xdp.c +++ b/xdp.c @@ -265,7 +265,7 @@ int xdp_drop_prog(struct xdp_md *ctx) const void *l4hdr = NULL; const struct tcphdr *tcp = NULL; uint8_t ports_valid = 0; - uint16_t sport, dport; // Host Endian! Only valid with tcp || udp + uint16_t sport = 0, dport = 0; // Host Endian! Only valid with tcp || udp #ifdef NEED_V4_PARSE if (eth_proto == BE16(ETH_P_IP)) { -- 2.30.2