From: Eric Leblond Date: Sat, 11 May 2019 09:09:40 +0000 (+0200) Subject: ebpf: fix UDP bypass in xdp_filter X-Git-Tag: suricata-5.0.0-rc1~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2d3a5a92ac60d7c8ae28510d85344d044f74606;p=thirdparty%2Fsuricata.git ebpf: fix UDP bypass in xdp_filter --- diff --git a/ebpf/xdp_filter.c b/ebpf/xdp_filter.c index a10ff24957..8ffa412762 100644 --- a/ebpf/xdp_filter.c +++ b/ebpf/xdp_filter.c @@ -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; }