aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2024-01-24 16:34:01 +0000
committerKristof Provost <kp@FreeBSD.org>2024-01-24 18:08:29 +0000
commitf1c0030bb05cfa01bdd500e50befbb425fecc4c4 (patch)
tree615fe67cd6026b69dc3f079dfaac53bad47cb9d0
parenta3ed434a69c903fa58ef001c11c9466166d67c92 (diff)
-rw-r--r--sys/netpfil/pf/pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 38a5a45d7991..2dc6d02d330a 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -8515,7 +8515,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb
* confused and fail to send the icmp6 packet too big error. Just send
* it here, before we do any NAT.
*/
- if (dir == PF_OUT && IN6_LINKMTU(ifp) < pf_max_frag_size(m)) {
+ if (dir == PF_OUT && pflags & PFIL_FWD && IN6_LINKMTU(ifp) < pf_max_frag_size(m)) {
PF_RULES_RUNLOCK();
*m0 = NULL;
icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, IN6_LINKMTU(ifp));