diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2004-12-30 17:54:53 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2004-12-30 17:54:53 +0000 |
| commit | 08e044cb8921733f0c5d815ee67f4d99bba98156 (patch) | |
| tree | f1dbc2ee53a82695fe514cdabda594b6a61b04ab /sys/netipx | |
| parent | 80a4dabe7d0f6c43da4da8380a0dbbb577732b11 (diff) | |
Notes
Diffstat (limited to 'sys/netipx')
| -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 e7036e296978..1d1697d448ae 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 6cb8e50598d7..aa7527a93209 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); |
