From: Matt Corallo Date: Sun, 19 Nov 2023 03:10:19 +0000 (+0000) Subject: Allow matching on local and remote IPs X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=45d1ea8a29d087286736ada7dd48f497683667ed;p=bpfnofrags Allow matching on local and remote IPs --- diff --git a/swapper.h b/swapper.h index 9795149..25f4a1f 100644 --- a/swapper.h +++ b/swapper.h @@ -59,7 +59,7 @@ struct { static inline void _maybe_swap_egress(struct iphdr *ip) { if (unlikely(ip->ihl != 5)) return; - CHECK_SRC_DST(ip->daddr); + CHECK_LOCAL_REMOTE(ip->saddr, ip->daddr); if (ip->protocol == IP_PROTO_UDP) { if (ip->frag_off == BE16(IP_MF)) {