diff options
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 53205e0e6b1..5865554108a 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.1089 2019/08/29 06:13:46 sashan Exp $ */ +/* $OpenBSD: pf.c,v 1.1090 2019/10/17 11:23:49 millert Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -3055,7 +3055,7 @@ pf_match_port(u_int8_t op, u_int16_t a1, u_int16_t a2, u_int16_t p) int pf_match_uid(u_int8_t op, uid_t a1, uid_t a2, uid_t u) { - if (u == UID_MAX && op != PF_OP_EQ && op != PF_OP_NE) + if (u == -1 && op != PF_OP_EQ && op != PF_OP_NE) return (0); return (pf_match(op, a1, a2, u)); } @@ -3063,7 +3063,7 @@ pf_match_uid(u_int8_t op, uid_t a1, uid_t a2, uid_t u) int pf_match_gid(u_int8_t op, gid_t a1, gid_t a2, gid_t g) { - if (g == GID_MAX && op != PF_OP_EQ && op != PF_OP_NE) + if (g == -1 && op != PF_OP_EQ && op != PF_OP_NE) return (0); return (pf_match(op, a1, a2, g)); } @@ -3225,8 +3225,8 @@ pf_socket_lookup(struct pf_pdesc *pd) struct inpcbtable *tb; struct inpcb *inp; - pd->lookup.uid = UID_MAX; - pd->lookup.gid = GID_MAX; + pd->lookup.uid = -1; + pd->lookup.gid = -1; pd->lookup.pid = NO_PID; switch (pd->virtual_proto) { case IPPROTO_TCP: @@ -6945,8 +6945,8 @@ pf_test(sa_family_t af, int fwdir, struct ifnet *ifp, struct mbuf **m0) */ if (fwdir == PF_FWD) { pd.lookup.done = -1; - pd.lookup.uid = UID_MAX; - pd.lookup.gid = GID_MAX; + pd.lookup.uid = -1; + pd.lookup.gid = -1; pd.lookup.pid = NO_PID; } |