projects
/
project
/
qosify.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e728a31
)
bpf: work around a verifier issue
author
Felix Fietkau
<
[email protected]
>
Sun, 21 Nov 2021 12:43:41 +0000
(13:43 +0100)
committer
Felix Fietkau
<
[email protected]
>
Sun, 21 Nov 2021 12:43:45 +0000
(13:43 +0100)
Force access to both src/dest fields, otherwise the llvm optimizer can turn
this into pointer arithmetic that older kernels will reject
Signed-off-by: Felix Fietkau <
[email protected]
>
qosify-bpf.c
patch
|
blob
|
history
diff --git
a/qosify-bpf.c
b/qosify-bpf.c
index eb13e9bd42c956eac7765c5c27b1e95a28183c99..a0635ecd59e7a9bb94338ca9cb2f403cbc1d32e7 100644
(file)
--- a/
qosify-bpf.c
+++ b/
qosify-bpf.c
@@
-258,10
+258,12
@@
parse_l4proto(struct qosify_config *config, struct __sk_buff *skb,
return;
}
+ src = READ_ONCE(udp->source);
+ dest = READ_ONCE(udp->dest);
if (ingress)
- key =
udp->source
;
+ key =
src
;
else
- key =
udp->
dest;
+ key = dest;
if (proto == IPPROTO_TCP) {
value = bpf_map_lookup_elem(&tcp_ports, &key);