Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet cleanup after last commit
details: https://anonhg.NetBSD.org/src/rev/0dcb823ec6e0
branches: trunk
changeset: 330860:0dcb823ec6e0
user: rtr <rtr%NetBSD.org@localhost>
date: Thu Jul 24 16:02:19 2014 +0000
description:
cleanup after last commit
- add KASSERT(req != PRU_BIND) and KASSERT(req != PRU_LISTEN) inside
tcp_usrreq() as these reqs should no longer reach here.
- remove (now unreachable) PRU_LISTEN case in switch.
diffstat:
sys/netinet/tcp_usrreq.c | 27 ++++-----------------------
1 files changed, 4 insertions(+), 23 deletions(-)
diffs (55 lines):
diff -r e12639627ae3 -r 0dcb823ec6e0 sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c Thu Jul 24 15:16:26 2014 +0000
+++ b/sys/netinet/tcp_usrreq.c Thu Jul 24 16:02:19 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_usrreq.c,v 1.190 2014/07/24 15:12:03 rtr Exp $ */
+/* $NetBSD: tcp_usrreq.c,v 1.191 2014/07/24 16:02:19 rtr Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.190 2014/07/24 15:12:03 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.191 2014/07/24 16:02:19 rtr Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -199,6 +199,8 @@
KASSERT(req != PRU_ATTACH);
KASSERT(req != PRU_DETACH);
KASSERT(req != PRU_ACCEPT);
+ KASSERT(req != PRU_BIND);
+ KASSERT(req != PRU_LISTEN);
KASSERT(req != PRU_CONTROL);
KASSERT(req != PRU_SENSE);
KASSERT(req != PRU_PEERADDR);
@@ -294,27 +296,6 @@
switch (req) {
/*
- * Prepare to accept connections.
- */
- case PRU_LISTEN:
-#ifdef INET
- if (inp && inp->inp_lport == 0) {
- error = in_pcbbind(inp, NULL);
- if (error)
- break;
- }
-#endif
-#ifdef INET6
- if (in6p && in6p->in6p_lport == 0) {
- error = in6_pcbbind(in6p, NULL);
- if (error)
- break;
- }
-#endif
- tp->t_state = TCPS_LISTEN;
- break;
-
- /*
* Initiate connection to peer.
* Create a template for use in transmissions on this connection.
* Enter SYN_SENT state, and mark socket as connecting.
Home |
Main Index |
Thread Index |
Old Index