summaryrefslogtreecommitdiffstats
path: root/sys/netipx
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-03-26 15:41:44 +0000
committerrwatson <rwatson@FreeBSD.org>2006-03-26 15:41:44 +0000
commitaa0485c22be44d024eac93dcbe7efbb48dcc55b2 (patch)
treebdcfd3977b3a6b4709aff78963a24c81b78bbc08 /sys/netipx
parent48e5e4792dd834813dd543cce68867e07d6c6d65 (diff)
downloadFreeBSD-src-aa0485c22be44d024eac93dcbe7efbb48dcc55b2.zip
FreeBSD-src-aa0485c22be44d024eac93dcbe7efbb48dcc55b2.tar.gz
Add a new ipxpcb flag, IPXP_SPX, which is set on ipxpcb's to mark them
as belonging to SPX. This replaces the implicit assumption that the cb pointer for non-SPX pcb's will be NULL. This isn't required in TCP/IP as different pcb lists are maintained for different IP protocols; IPX stores all pcbs on the same global ipxpcb_list. Foot provided by: gnn MFC after: 1 month
Diffstat (limited to 'sys/netipx')
-rw-r--r--sys/netipx/ipx_pcb.h1
-rw-r--r--sys/netipx/spx_usrreq.c23
2 files changed, 15 insertions, 9 deletions
diff --git a/sys/netipx/ipx_pcb.h b/sys/netipx/ipx_pcb.h
index 86071c1..51fbdea 100644
--- a/sys/netipx/ipx_pcb.h
+++ b/sys/netipx/ipx_pcb.h
@@ -77,6 +77,7 @@ extern struct mtx ipxpcb_list_mtx;
#define IPXP_ALL_PACKETS 0x8 /* Turn off higher proto processing. */
#define IPXP_CHECKSUM 0x10 /* Use checksum on this socket. */
#define IPXP_DROPPED 0x20 /* Connection dropped. */
+#define IPXP_SPX 0x40 /* SPX PCB. */
#define IPX_WILDCARD 1
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index dad3cd9..4b1da04 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -1389,6 +1389,7 @@ spx_attach(struct socket *so, int proto, struct thread *td)
return (error);
}
ipxp = sotoipxpcb(so);
+ ipxp->ipxp_flags |= IPXP_SPX;
cb->s_ipx = mtod(mm, struct ipx *);
cb->s_state = TCPS_LISTEN;
@@ -1841,14 +1842,17 @@ spx_fasttimo(void)
IPX_LIST_LOCK();
LIST_FOREACH(ipxp, &ipxpcb_list, ipxp_list) {
IPX_LOCK(ipxp);
- if (!(ipxp->ipxp_flags & IPXP_DROPPED)) {
- cb = ipxtospxpcb(ipxp);
- if (cb->s_flags & SF_DELACK) {
- cb->s_flags &= ~SF_DELACK;
- cb->s_flags |= SF_ACKNOW;
- spxstat.spxs_delack++;
- spx_output(cb, NULL);
- }
+ if (!(ipxp->ipxp_flags & IPXP_SPX) ||
+ (ipxp->ipxp_flags & IPXP_DROPPED)) {
+ IPX_UNLOCK(ipxp);
+ continue;
+ }
+ cb = ipxtospxpcb(ipxp);
+ if (cb->s_flags & SF_DELACK) {
+ cb->s_flags &= ~SF_DELACK;
+ cb->s_flags |= SF_ACKNOW;
+ spxstat.spxs_delack++;
+ spx_output(cb, NULL);
}
IPX_UNLOCK(ipxp);
}
@@ -1873,7 +1877,8 @@ spx_slowtimo(void)
IPX_LIST_LOCK();
LIST_FOREACH(ipxp, &ipxpcb_list, ipxp_list) {
IPX_LOCK(ipxp);
- if (ipxp->ipxp_flags & IPXP_DROPPED) {
+ if (!(ipxp->ipxp_flags & IPXP_SPX) ||
+ (ipxp->ipxp_flags & IPXP_DROPPED)) {
IPX_UNLOCK(ipxp);
continue;
}
OpenPOWER on IntegriCloud