summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Fernandez Mancera <fmancera@suse.de>2026-05-26 23:58:28 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2026-06-05 13:11:55 +0200
commit22bb132cfb9b94847d52d73614284b8c5ea8d36e (patch)
tree78118c437aaff98c6b3145b3fc5b1cc546c95f9c
parent63d29ee95c4ab5976d660182d2e4733bb4a091d8 (diff)
downloadlinux-22bb132cfb9b94847d52d73614284b8c5ea8d36e.tar.gz
linux-22bb132cfb9b94847d52d73614284b8c5ea8d36e.zip
netfilter: synproxy: adjust duplicate timestamp options
RFC 9293 does not mention anything about duplicated options and each networking stack handles it in their own way. Currently, Linux kernel is processing options sequentially and in case of duplicated timestamp options, the value from the latest one overrides the others. As SYNPROXY is modifying only the first timestamp option found, a packet can reach the backend server and it might parse the wrong timestamp value. Let's just continue parsing the following options and in case a duplicated timestamp is found, adjust it too. Fixes: 48b1de4c110a ("netfilter: add SYNPROXY core/target") Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--net/netfilter/nf_synproxy_core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c
index f99c22f57b7e..a0bcf188810d 100644
--- a/net/netfilter/nf_synproxy_core.c
+++ b/net/netfilter/nf_synproxy_core.c
@@ -233,7 +233,6 @@ synproxy_tstamp_adjust(struct sk_buff *skb, unsigned int protoff,
}
inet_proto_csum_replace4(&th->check, skb,
old, *ptr, false);
- return true;
}
optoff += op[1];
}