]> git.bitcoin.ninja Git - bpfnofrags/commitdiff
Allow matching on local and remote IPs master
authorMatt Corallo <git@bluematt.me>
Sun, 19 Nov 2023 03:10:19 +0000 (03:10 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 19 Nov 2023 03:10:19 +0000 (03:10 +0000)
swapper.h

index 979514921244992c48019ce7b28070f86ffee479..25f4a1ff928f744f81508ac4bb303973ccac4dc1 100644 (file)
--- 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)) {