diff options
author | Dug Song <dugsong@cvs.openbsd.org> | 2001-06-26 22:56:04 +0000 |
---|---|---|
committer | Dug Song <dugsong@cvs.openbsd.org> | 2001-06-26 22:56:04 +0000 |
commit | 5443a9225a2606ca75ce32b901232279e960006d (patch) | |
tree | f842c72f391e57c7f2edfc3316e24e45918dddb3 /sys/net/pf.c | |
parent | 86b92cfc6b5f945e91bb95b870808f2541a01b5b (diff) |
name comparison operators
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index f00544f8fdb..00f554ce174 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.64 2001/06/26 22:26:12 deraadt Exp $ */ +/* $OpenBSD: pf.c,v 1.65 2001/06/26 22:56:02 dugsong Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -1165,19 +1165,19 @@ int match_port(u_int8_t op, u_int16_t a1, u_int16_t a2, u_int16_t p) { switch (op) { - case 1: + case PF_OP_GL: return (p >= a1) && (p <= a2); - case 2: + case PF_OP_EQ: return (p == a1); - case 3: + case PF_OP_NE: return (p != a1); - case 4: - return (p < a1); - case 5: + case PF_OP_LT: + return (p < a1); + case PF_OP_LE: return (p <= a1); - case 6: - return (p > a1); - case 7: + case PF_OP_GT: + return (p > a1); + case PF_OP_GE: return (p >= a1); } return (0); /* never reached */ |