diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-04-12 10:47:30 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-04-12 10:47:30 +0000 |
commit | a815c5ebf2cbe29d29c5740a1bc7c055bbeb40a3 (patch) | |
tree | 110dd97ab68614bfc61af5c9e99f086a5f51bc2f /sys/net/pf.c | |
parent | f33be7cee7a3239fa476d7566369325150398a25 (diff) |
put the accepted socket of a diverted connection into the routing domain
of a connection originator. this allows one to query the source rdomain
with a SO_RTABLE socket option. figured out with reyk, ok claudio.
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index db6623d599d..8a0dcf54cf6 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.739 2011/04/07 19:35:05 miod Exp $ */ +/* $OpenBSD: pf.c,v 1.740 2011/04/12 10:47:29 mikeb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -5964,6 +5964,7 @@ done: if ((divert = pf_get_divert(m))) { m->m_pkthdr.pf.flags |= PF_TAG_DIVERTED; divert->port = r->divert.port; + divert->rdomain = pd.rdomain; divert->addr.ipv4 = r->divert.addr.v4; } } @@ -6243,6 +6244,7 @@ done: if ((divert = pf_get_divert(m))) { m->m_pkthdr.pf.flags |= PF_TAG_DIVERTED; divert->port = r->divert.port; + divert->rdomain = pd.rdomain; divert->addr.ipv6 = r->divert.addr.v6; } } |