summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2013-10-23 16:13:55 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2013-10-23 16:13:55 +0000
commit52b8f3047539e86398805821a76e7c80ddb91588 (patch)
treec70192b7833409ea66b184a32ff1f8ab26dc69ef
parent1a3b1319ca57ab46fab3ded9f84aa2c070007e46 (diff)
translate port numbers for inner udp packets when they're returned
as a payload of icmp error messages; makes traceroute6 operate across a nat64 gateway. prompted by sthen, ok henning
-rw-r--r--sys/net/pf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 4cd98f27af7..062350c28d6 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.852 2013/10/23 15:12:42 mpi Exp $ */
+/* $OpenBSD: pf.c,v 1.853 2013/10/23 16:13:54 mikeb Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -4980,6 +4980,8 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
pf_change_ap(pd, pd2.dst,
&uh.uh_sum, &nk->addr[pd2.didx],
nk->port[didx], nk->af);
+ uh.uh_sport = nk->port[sidx];
+ uh.uh_dport = nk->port[didx];
m_copyback(pd2.m, pd2.off, sizeof(uh),
&uh, M_NOWAIT);
pd->m->m_pkthdr.rdomain = nk->rdomain;