Fix PCBGROUPS build post CK conversion of pcbinfo
This commit is contained in:
parent
6ee13c54da
commit
feeef8509b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335093
@ -2025,7 +2025,7 @@ in_pcblookup_group(struct inpcbinfo *pcbinfo, struct inpcbgroup *pcbgroup,
|
|||||||
INP_GROUP_LOCK(pcbgroup);
|
INP_GROUP_LOCK(pcbgroup);
|
||||||
head = &pcbgroup->ipg_hashbase[INP_PCBHASH(faddr.s_addr, lport, fport,
|
head = &pcbgroup->ipg_hashbase[INP_PCBHASH(faddr.s_addr, lport, fport,
|
||||||
pcbgroup->ipg_hashmask)];
|
pcbgroup->ipg_hashmask)];
|
||||||
LIST_FOREACH(inp, head, inp_pcbgrouphash) {
|
CK_LIST_FOREACH(inp, head, inp_pcbgrouphash) {
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
/* XXX inp locking */
|
/* XXX inp locking */
|
||||||
if ((inp->inp_vflag & INP_IPV4) == 0)
|
if ((inp->inp_vflag & INP_IPV4) == 0)
|
||||||
@ -2075,7 +2075,7 @@ in_pcblookup_group(struct inpcbinfo *pcbinfo, struct inpcbgroup *pcbgroup,
|
|||||||
|
|
||||||
head = &pcbgroup->ipg_hashbase[INP_PCBHASH(INADDR_ANY,
|
head = &pcbgroup->ipg_hashbase[INP_PCBHASH(INADDR_ANY,
|
||||||
lport, 0, pcbgroup->ipg_hashmask)];
|
lport, 0, pcbgroup->ipg_hashmask)];
|
||||||
LIST_FOREACH(inp, head, inp_pcbgrouphash) {
|
CK_LIST_FOREACH(inp, head, inp_pcbgrouphash) {
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
/* XXX inp locking */
|
/* XXX inp locking */
|
||||||
if ((inp->inp_vflag & INP_IPV4) == 0)
|
if ((inp->inp_vflag & INP_IPV4) == 0)
|
||||||
@ -2149,7 +2149,7 @@ in_pcblookup_group(struct inpcbinfo *pcbinfo, struct inpcbgroup *pcbgroup,
|
|||||||
*/
|
*/
|
||||||
head = &pcbinfo->ipi_wildbase[INP_PCBHASH(INADDR_ANY, lport,
|
head = &pcbinfo->ipi_wildbase[INP_PCBHASH(INADDR_ANY, lport,
|
||||||
0, pcbinfo->ipi_wildmask)];
|
0, pcbinfo->ipi_wildmask)];
|
||||||
LIST_FOREACH(inp, head, inp_pcbgroup_wild) {
|
CK_LIST_FOREACH(inp, head, inp_pcbgroup_wild) {
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
/* XXX inp locking */
|
/* XXX inp locking */
|
||||||
if ((inp->inp_vflag & INP_IPV4) == 0)
|
if ((inp->inp_vflag & INP_IPV4) == 0)
|
||||||
|
@ -276,7 +276,7 @@ struct inpcb {
|
|||||||
TAILQ_ENTRY(inpcb) inp_input; /* pacing in queue next lock(b) */
|
TAILQ_ENTRY(inpcb) inp_input; /* pacing in queue next lock(b) */
|
||||||
struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */
|
struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */
|
||||||
struct inpcbgroup *inp_pcbgroup; /* (g/i) PCB group list */
|
struct inpcbgroup *inp_pcbgroup; /* (g/i) PCB group list */
|
||||||
LIST_ENTRY(inpcb) inp_pcbgroup_wild; /* (g/i/h) group wildcard entry */
|
CK_LIST_ENTRY(inpcb) inp_pcbgroup_wild; /* (g/i/h) group wildcard entry */
|
||||||
struct ucred *inp_cred; /* (c) cache of socket cred */
|
struct ucred *inp_cred; /* (c) cache of socket cred */
|
||||||
u_int32_t inp_flow; /* (i) IPv6 flow information */
|
u_int32_t inp_flow; /* (i) IPv6 flow information */
|
||||||
u_char inp_vflag; /* (i) IP version flag (v4/v6) */
|
u_char inp_vflag; /* (i) IP version flag (v4/v6) */
|
||||||
|
@ -207,7 +207,7 @@ in_pcbgroup_destroy(struct inpcbinfo *pcbinfo)
|
|||||||
|
|
||||||
for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++) {
|
for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++) {
|
||||||
pcbgroup = &pcbinfo->ipi_pcbgroups[pgn];
|
pcbgroup = &pcbinfo->ipi_pcbgroups[pgn];
|
||||||
KASSERT(LIST_EMPTY(pcbinfo->ipi_listhead),
|
KASSERT(CK_LIST_EMPTY(pcbinfo->ipi_listhead),
|
||||||
("in_pcbinfo_destroy: listhead not empty"));
|
("in_pcbinfo_destroy: listhead not empty"));
|
||||||
INP_GROUP_LOCK_DESTROY(pcbgroup);
|
INP_GROUP_LOCK_DESTROY(pcbgroup);
|
||||||
hashdestroy(pcbgroup->ipg_hashbase, M_PCB,
|
hashdestroy(pcbgroup->ipg_hashbase, M_PCB,
|
||||||
@ -338,7 +338,7 @@ in_pcbwild_add(struct inpcb *inp)
|
|||||||
INP_GROUP_LOCK(&pcbinfo->ipi_pcbgroups[pgn]);
|
INP_GROUP_LOCK(&pcbinfo->ipi_pcbgroups[pgn]);
|
||||||
head = &pcbinfo->ipi_wildbase[INP_PCBHASH(INADDR_ANY, inp->inp_lport,
|
head = &pcbinfo->ipi_wildbase[INP_PCBHASH(INADDR_ANY, inp->inp_lport,
|
||||||
0, pcbinfo->ipi_wildmask)];
|
0, pcbinfo->ipi_wildmask)];
|
||||||
LIST_INSERT_HEAD(head, inp, inp_pcbgroup_wild);
|
CK_LIST_INSERT_HEAD(head, inp, inp_pcbgroup_wild);
|
||||||
inp->inp_flags2 |= INP_PCBGROUPWILD;
|
inp->inp_flags2 |= INP_PCBGROUPWILD;
|
||||||
for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++)
|
for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++)
|
||||||
INP_GROUP_UNLOCK(&pcbinfo->ipi_pcbgroups[pgn]);
|
INP_GROUP_UNLOCK(&pcbinfo->ipi_pcbgroups[pgn]);
|
||||||
@ -357,7 +357,7 @@ in_pcbwild_remove(struct inpcb *inp)
|
|||||||
pcbinfo = inp->inp_pcbinfo;
|
pcbinfo = inp->inp_pcbinfo;
|
||||||
for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++)
|
for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++)
|
||||||
INP_GROUP_LOCK(&pcbinfo->ipi_pcbgroups[pgn]);
|
INP_GROUP_LOCK(&pcbinfo->ipi_pcbgroups[pgn]);
|
||||||
LIST_REMOVE(inp, inp_pcbgroup_wild);
|
CK_LIST_REMOVE(inp, inp_pcbgroup_wild);
|
||||||
for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++)
|
for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++)
|
||||||
INP_GROUP_UNLOCK(&pcbinfo->ipi_pcbgroups[pgn]);
|
INP_GROUP_UNLOCK(&pcbinfo->ipi_pcbgroups[pgn]);
|
||||||
inp->inp_flags2 &= ~INP_PCBGROUPWILD;
|
inp->inp_flags2 &= ~INP_PCBGROUPWILD;
|
||||||
@ -415,7 +415,7 @@ in_pcbgroup_update_internal(struct inpcbinfo *pcbinfo,
|
|||||||
oldpcbgroup = inp->inp_pcbgroup;
|
oldpcbgroup = inp->inp_pcbgroup;
|
||||||
if (oldpcbgroup != NULL && oldpcbgroup != newpcbgroup) {
|
if (oldpcbgroup != NULL && oldpcbgroup != newpcbgroup) {
|
||||||
INP_GROUP_LOCK(oldpcbgroup);
|
INP_GROUP_LOCK(oldpcbgroup);
|
||||||
LIST_REMOVE(inp, inp_pcbgrouphash);
|
CK_LIST_REMOVE(inp, inp_pcbgrouphash);
|
||||||
inp->inp_pcbgroup = NULL;
|
inp->inp_pcbgroup = NULL;
|
||||||
INP_GROUP_UNLOCK(oldpcbgroup);
|
INP_GROUP_UNLOCK(oldpcbgroup);
|
||||||
}
|
}
|
||||||
@ -445,7 +445,7 @@ in_pcbgroup_update_internal(struct inpcbinfo *pcbinfo,
|
|||||||
inp->inp_fport,
|
inp->inp_fport,
|
||||||
newpcbgroup->ipg_hashmask)];
|
newpcbgroup->ipg_hashmask)];
|
||||||
}
|
}
|
||||||
LIST_INSERT_HEAD(pcbhash, inp, inp_pcbgrouphash);
|
CK_LIST_INSERT_HEAD(pcbhash, inp, inp_pcbgrouphash);
|
||||||
inp->inp_pcbgroup = newpcbgroup;
|
inp->inp_pcbgroup = newpcbgroup;
|
||||||
INP_GROUP_UNLOCK(newpcbgroup);
|
INP_GROUP_UNLOCK(newpcbgroup);
|
||||||
}
|
}
|
||||||
@ -548,7 +548,7 @@ in_pcbgroup_remove(struct inpcb *inp)
|
|||||||
pcbgroup = inp->inp_pcbgroup;
|
pcbgroup = inp->inp_pcbgroup;
|
||||||
if (pcbgroup != NULL) {
|
if (pcbgroup != NULL) {
|
||||||
INP_GROUP_LOCK(pcbgroup);
|
INP_GROUP_LOCK(pcbgroup);
|
||||||
LIST_REMOVE(inp, inp_pcbgrouphash);
|
CK_LIST_REMOVE(inp, inp_pcbgrouphash);
|
||||||
inp->inp_pcbgroup = NULL;
|
inp->inp_pcbgroup = NULL;
|
||||||
INP_GROUP_UNLOCK(pcbgroup);
|
INP_GROUP_UNLOCK(pcbgroup);
|
||||||
}
|
}
|
||||||
|
@ -946,7 +946,7 @@ in6_pcblookup_group(struct inpcbinfo *pcbinfo, struct inpcbgroup *pcbgroup,
|
|||||||
INP_GROUP_LOCK(pcbgroup);
|
INP_GROUP_LOCK(pcbgroup);
|
||||||
head = &pcbgroup->ipg_hashbase[INP_PCBHASH(
|
head = &pcbgroup->ipg_hashbase[INP_PCBHASH(
|
||||||
INP6_PCBHASHKEY(faddr), lport, fport, pcbgroup->ipg_hashmask)];
|
INP6_PCBHASHKEY(faddr), lport, fport, pcbgroup->ipg_hashmask)];
|
||||||
LIST_FOREACH(inp, head, inp_pcbgrouphash) {
|
CK_LIST_FOREACH(inp, head, inp_pcbgrouphash) {
|
||||||
/* XXX inp locking */
|
/* XXX inp locking */
|
||||||
if ((inp->inp_vflag & INP_IPV6) == 0)
|
if ((inp->inp_vflag & INP_IPV6) == 0)
|
||||||
continue;
|
continue;
|
||||||
@ -987,7 +987,7 @@ in6_pcblookup_group(struct inpcbinfo *pcbinfo, struct inpcbgroup *pcbgroup,
|
|||||||
*/
|
*/
|
||||||
head = &pcbgroup->ipg_hashbase[
|
head = &pcbgroup->ipg_hashbase[
|
||||||
INP_PCBHASH(INADDR_ANY, lport, 0, pcbgroup->ipg_hashmask)];
|
INP_PCBHASH(INADDR_ANY, lport, 0, pcbgroup->ipg_hashmask)];
|
||||||
LIST_FOREACH(inp, head, inp_pcbgrouphash) {
|
CK_LIST_FOREACH(inp, head, inp_pcbgrouphash) {
|
||||||
/* XXX inp locking */
|
/* XXX inp locking */
|
||||||
if ((inp->inp_vflag & INP_IPV6) == 0)
|
if ((inp->inp_vflag & INP_IPV6) == 0)
|
||||||
continue;
|
continue;
|
||||||
@ -1049,7 +1049,7 @@ in6_pcblookup_group(struct inpcbinfo *pcbinfo, struct inpcbgroup *pcbgroup,
|
|||||||
head = &pcbinfo->ipi_wildbase[INP_PCBHASH(
|
head = &pcbinfo->ipi_wildbase[INP_PCBHASH(
|
||||||
INP6_PCBHASHKEY(&in6addr_any), lport, 0,
|
INP6_PCBHASHKEY(&in6addr_any), lport, 0,
|
||||||
pcbinfo->ipi_wildmask)];
|
pcbinfo->ipi_wildmask)];
|
||||||
LIST_FOREACH(inp, head, inp_pcbgroup_wild) {
|
CK_LIST_FOREACH(inp, head, inp_pcbgroup_wild) {
|
||||||
/* XXX inp locking */
|
/* XXX inp locking */
|
||||||
if ((inp->inp_vflag & INP_IPV6) == 0)
|
if ((inp->inp_vflag & INP_IPV6) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user