]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ebpf: fix UDP bypass in xdp_filter
authorEric Leblond <eric@regit.org>
Sat, 11 May 2019 09:09:40 +0000 (11:09 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 18 Jun 2019 05:07:02 +0000 (07:07 +0200)
ebpf/xdp_filter.c

index a10ff24957b0c8b324e9f2fce659f2da3a8a41d4..8ffa412762fff8bb669473408b386c19ef005fff 100644 (file)
@@ -181,7 +181,7 @@ static __always_inline int get_sport(void *trans_data, void *data_end,
             uh = (struct udphdr *)trans_data;
             if ((void *)(uh + 1) > data_end)
                 return -1;
-            return uh->dest;
+            return uh->source;
         default:
             return 0;
     }