From: Matt Corallo Date: Thu, 20 May 2021 14:26:41 +0000 (+0000) Subject: Satisfy BPF verifier with port swhich it can't prove are init'd values X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=flowspec-xdp;a=commitdiff_plain;h=36cf3e162d8ca62a573f7b7989a9ec5b50ebba8c Satisfy BPF verifier with port swhich it can't prove are init'd values --- 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)) {