summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-03-02 19:29:42 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-03-02 19:29:42 +0000
commit3dbdc25caaa3db71a6c09564da021de3915d52c4 (patch)
treec7eef76dc7da664d613b4e06c0f72130b1aac347
parent3d0dfb4eeaa08171a90c30d959143db481b3cc67 (diff)
Notes
-rw-r--r--sys/netinet/in_pcb.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 3f6343bca156..e02be155101d 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.2 (Berkeley) 1/4/94
- * $Id: in_pcb.c,v 1.4 1995/02/08 20:22:07 wollman Exp $
+ * $Id: in_pcb.c,v 1.5 1995/02/16 00:55:37 wollman Exp $
*/
#include <sys/param.h>
@@ -495,7 +495,7 @@ in_pcblookup(head, faddr, fport_arg, laddr, lport_arg, flags)
u_int fport_arg, lport_arg;
int flags;
{
- register struct inpcb *inp, *match = 0;
+ register struct inpcb *inp, *match = NULL;
int matchwild = 3, wildcard;
u_short fport = fport_arg, lport = lport_arg;
@@ -527,8 +527,13 @@ in_pcblookup(head, faddr, fport_arg, laddr, lport_arg, flags)
if (wildcard < matchwild) {
match = inp;
matchwild = wildcard;
- if (matchwild == 0)
+ if (matchwild == 0) {
+ if (match->inp_prev != head) {
+ remque(match);
+ insque(match, head);
+ }
break;
+ }
}
}
return (match);