diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-01-03 09:42:31 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-01-03 09:42:31 +0000 |
commit | 875e2ef53f679775f21613b6e76ffea5074b0e06 (patch) | |
tree | b3749b24b4cb295c6c69557d56ec72f92511ad55 /usr.sbin/relayd/pfe_filter.c | |
parent | 2f5ecd5f468a31e4f5f0399a3c82f0b78c47c3cd (diff) |
allow the sticky-address option for round-robin pools.
From Pierre-Yves Ritschard (pyr at spootnik dot org)
Diffstat (limited to 'usr.sbin/relayd/pfe_filter.c')
-rw-r--r-- | usr.sbin/relayd/pfe_filter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/relayd/pfe_filter.c b/usr.sbin/relayd/pfe_filter.c index 89ea50b48c5..76ce3e015f8 100644 --- a/usr.sbin/relayd/pfe_filter.c +++ b/usr.sbin/relayd/pfe_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfe_filter.c,v 1.2 2006/12/16 12:42:14 reyk Exp $ */ +/* $OpenBSD: pfe_filter.c,v 1.3 2007/01/03 09:42:30 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -308,6 +308,8 @@ sync_ruleset(struct hostated *env, struct service *service, int enable) rio.rule.rpool.proxy_port[0] = service->table->port; rio.rule.rpool.port_op = PF_OP_EQ; rio.rule.rpool.opts = PF_POOL_ROUNDROBIN; + if (service->flags & F_STICKY) + rio.rule.rpool.opts |= PF_POOL_STICKYADDR; if (ioctl(env->pf->dev, DIOCADDRULE, &rio) == -1) fatal("cannot add rule"); |