summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/relay.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2007-07-26 23:29:41 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2007-07-26 23:29:41 +0000
commitea23c7a03c590fa77b58866ea8a57993bc5335a3 (patch)
tree756d9e337b020f7c884b8bc6fcc588805d4165be /usr.sbin/relayd/relay.c
parent93a71e9807dc8dac04ba2211d4b7502d24135962 (diff)
Combine http filter/expect cases to simplify code.
ok reyk@
Diffstat (limited to 'usr.sbin/relayd/relay.c')
-rw-r--r--usr.sbin/relayd/relay.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c
index 33f54f8f099..e863ce35c01 100644
--- a/usr.sbin/relayd/relay.c
+++ b/usr.sbin/relayd/relay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay.c,v 1.35 2007/06/19 06:29:20 pyr Exp $ */
+/* $OpenBSD: relay.c,v 1.36 2007/07/26 23:29:40 jsg Exp $ */
/*
* Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -856,17 +856,11 @@ relay_handle_http(struct ctl_relay_event *cre, struct protonode *pn,
pk->key, pk->value);
break;
case NODE_ACTION_EXPECT:
- DPRINTF("relay_handle_http: expect '%s: %s'",
- pn->key, pn->value);
- if (fnmatch(pn->value, pk->value, FNM_CASEFOLD) == 0) {
- if (pn->flags & PNFLAG_MARK)
- cre->marked++;
- cre->nodes[pn->id] = 1;
- }
ret = PN_PASS;
- break;
+ /* FALLTHROUGH */
case NODE_ACTION_FILTER:
- DPRINTF("relay_handle_http: filter '%s: %s'",
+ DPRINTF("relay_handle_http: %s '%s: %s'",
+ (pn->action == NODE_ACTION_EXPECT) ? "expect" : "filter",
pn->key, pn->value);
if (fnmatch(pn->value, pk->value, FNM_CASEFOLD) == 0) {
if (pn->flags & PNFLAG_MARK)