summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-09-27 10:14:02 +0000
committerrwatson <rwatson@FreeBSD.org>2008-09-27 10:14:02 +0000
commitcf8fa20f595b028abc92fec21ad969a33dcd03fa (patch)
tree395d08ee026fb27b23428dd315a99b13b5d979be
parent4efdef565f9a0ca3468534f97c6ac4aaaf747c9a (diff)
downloadFreeBSD-src-cf8fa20f595b028abc92fec21ad969a33dcd03fa.zip
FreeBSD-src-cf8fa20f595b028abc92fec21ad969a33dcd03fa.tar.gz
Rather than shadowing global variable 'lookup' in check_uidgid(), rename
it to ugid_lookupp. This should make debugging issues with ipfw uid rules easier. MFC after: 3 days
-rw-r--r--sys/netinet/ip_fw2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index 3f536fe..f9325bd 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -1979,7 +1979,7 @@ fill_ugid_cache(struct inpcb *inp, struct ip_fw_ugid *ugp)
static int
check_uidgid(ipfw_insn_u32 *insn, int proto, struct ifnet *oif,
struct in_addr dst_ip, u_int16_t dst_port, struct in_addr src_ip,
- u_int16_t src_port, struct ip_fw_ugid *ugp, int *lookup,
+ u_int16_t src_port, struct ip_fw_ugid *ugp, int *ugid_lookupp,
struct inpcb *inp)
{
struct inpcbinfo *pi;
@@ -1993,11 +1993,11 @@ check_uidgid(ipfw_insn_u32 *insn, int proto, struct ifnet *oif,
* the PCB. If so, rather then holding a lock and looking
* up the PCB, we can use the one that was supplied.
*/
- if (inp && *lookup == 0) {
+ if (inp && *ugid_lookupp == 0) {
INP_LOCK_ASSERT(inp);
if (inp->inp_socket != NULL) {
fill_ugid_cache(inp, ugp);
- *lookup = 1;
+ *ugid_lookupp = 1;
}
}
/*
@@ -2005,7 +2005,7 @@ check_uidgid(ipfw_insn_u32 *insn, int proto, struct ifnet *oif,
* PCB entry associated with it, then we can safely
* assume that this is a no match.
*/
- if (*lookup == -1)
+ if (*ugid_lookupp == -1)
return (0);
if (proto == IPPROTO_TCP) {
wildcard = 0;
@@ -2016,7 +2016,7 @@ check_uidgid(ipfw_insn_u32 *insn, int proto, struct ifnet *oif,
} else
return 0;
match = 0;
- if (*lookup == 0) {
+ if (*ugid_lookupp == 0) {
INP_INFO_RLOCK(pi);
pcb = (oif) ?
in_pcblookup_hash(pi,
@@ -2031,19 +2031,19 @@ check_uidgid(ipfw_insn_u32 *insn, int proto, struct ifnet *oif,
INP_RLOCK(pcb);
if (pcb->inp_socket != NULL) {
fill_ugid_cache(pcb, ugp);
- *lookup = 1;
+ *ugid_lookupp = 1;
}
INP_RUNLOCK(pcb);
}
INP_INFO_RUNLOCK(pi);
- if (*lookup == 0) {
+ if (*ugid_lookupp == 0) {
/*
* If the lookup did not yield any results, there
* is no sense in coming back and trying again. So
* we can set lookup to -1 and ensure that we wont
* bother the pcb system again.
*/
- *lookup = -1;
+ *ugid_lookupp = -1;
return (0);
}
}
OpenPOWER on IntegriCloud