From 229ef2df43a26b29e5f8944f41126a911b16c0b7 Mon Sep 17 00:00:00 2001 From: bluhm Date: Sun, 13 Jul 2014 16:58:43 +0000 Subject: [PATCH] Put back a m_copyback() that got lost in rev 1.837 of pf.c. This fixes the rewrite of an IPv6 header of an ICMP6 packet in the payload of an ICMP6 error packet. Path MTU discovery with ping6 over pf nat or rdr works again. Found by src/regress/sys/net/pf_fragment make run-regress-fragping6 OK henning@ --- sys/net/pf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net/pf.c b/sys/net/pf.c index 162f968dcfa..247d6c63ddd 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.881 2014/07/10 03:17:59 lteo Exp $ */ +/* $OpenBSD: pf.c,v 1.882 2014/07/13 16:58:43 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -5249,7 +5249,9 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state, m_copyback(pd->m, pd->off, sizeof(struct icmp6_hdr), pd->hdr.icmp6, M_NOWAIT); - m_copyback(pd->m, pd2.off, + m_copyback(pd2.m, ipoff2, sizeof(h2_6), &h2_6, + M_NOWAIT); + m_copyback(pd2.m, pd2.off, sizeof(struct icmp6_hdr), &iih, M_NOWAIT); copyback = 1; } -- 2.20.1