summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/relay.c
diff options
context:
space:
mode:
authorChristopher Zimmermann <chrisz@cvs.openbsd.org>2019-07-13 06:53:01 +0000
committerChristopher Zimmermann <chrisz@cvs.openbsd.org>2019-07-13 06:53:01 +0000
commit0b2ad4a92ec831bbe022bc507f14671bec34366e (patch)
tree3e377616c01fcf4620813dec663ae58700825145 /usr.sbin/relayd/relay.c
parentb28d1d4917efbd28b9c45b7726a545ddc6df8908 (diff)
Don't "forward to <table>" when a "forward to destination" address is set.
This matches the documented behaviour. On matching "forward to <table>" filter rules the "forward to destination" address is unset, so that in that case the "forward to <table>" rule is still used. OK benno@, regression tests still passing.
Diffstat (limited to 'usr.sbin/relayd/relay.c')
-rw-r--r--usr.sbin/relayd/relay.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c
index 864d9104fbe..21efe259e05 100644
--- a/usr.sbin/relayd/relay.c
+++ b/usr.sbin/relayd/relay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay.c,v 1.249 2019/06/28 13:32:50 deraadt Exp $ */
+/* $OpenBSD: relay.c,v 1.250 2019/07/13 06:53:00 chrisz Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -1638,7 +1638,8 @@ relay_connect(struct rsession *con)
getmonotime(&con->se_tv_start);
- if (!TAILQ_EMPTY(&rlay->rl_tables)) {
+ if (con->se_out.ss.ss_family == AF_UNSPEC &&
+ !TAILQ_EMPTY(&rlay->rl_tables)) {
if (relay_from_table(con) != 0)
return (-1);
} else if (con->se_out.ss.ss_family == AF_UNSPEC) {