diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netipx/ipx_input.c | 1 | ||||
-rw-r--r-- | sys/netipx/ipx_pcb.c | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c index e7036e2..1d1697d 100644 --- a/sys/netipx/ipx_input.c +++ b/sys/netipx/ipx_input.c @@ -88,6 +88,7 @@ struct sockaddr_ipx ipx_netmask, ipx_hostmask; /* * IPX protocol control block (pcb) lists. */ +u_short ipxpcb_lport_cache; struct ipxpcbhead ipxpcb_list; struct ipxpcbhead ipxrawpcb_list; diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c index 6cb8e50..aa7527a 100644 --- a/sys/netipx/ipx_pcb.c +++ b/sys/netipx/ipx_pcb.c @@ -110,11 +110,11 @@ ipx_pcbbind(ipxp, nam, td) noname: if (lport == 0) do { - ipxpcb.ipxp_lport++; - if ((ipxpcb.ipxp_lport < IPXPORT_RESERVED) || - (ipxpcb.ipxp_lport >= IPXPORT_WELLKNOWN)) - ipxpcb.ipxp_lport = IPXPORT_RESERVED; - lport = htons(ipxpcb.ipxp_lport); + ipxpcb_lport_cache++; + if ((ipxpcb_lport_cache < IPXPORT_RESERVED) || + (ipxpcb_lport_cache >= IPXPORT_WELLKNOWN)) + ipxpcb_lport_cache = IPXPORT_RESERVED; + lport = htons(ipxpcb_lport_cache); } while (ipx_pcblookup(&zeroipx_addr, lport, 0)); ipxp->ipxp_lport = lport; return (0); |