Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Sep 2015 12:02:13 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287460 - head/sys/netinet
Message-ID:  <201509041202.t84C2DZX028065@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Fri Sep  4 12:02:12 2015
New Revision: 287460
URL: https://svnweb.freebsd.org/changeset/base/287460

Log:
  Make tcp_mtudisc() static and void. No functional changes.
  
  Sponsored by:	Nginx, Inc.

Modified:
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_var.h

Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c	Fri Sep  4 10:16:21 2015	(r287459)
+++ head/sys/netinet/tcp_subr.c	Fri Sep  4 12:02:12 2015	(r287460)
@@ -228,6 +228,7 @@ VNET_DEFINE(struct hhook_head *, tcp_hhh
 
 static struct inpcb *tcp_notify(struct inpcb *, int);
 static struct inpcb *tcp_mtudisc_notify(struct inpcb *, int);
+static void tcp_mtudisc(struct inpcb *, int);
 static char *	tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th,
 		    void *ip4hdr, const void *ip6hdr);
 static void	tcp_timer_discard(struct tcpcb *, uint32_t);
@@ -1811,10 +1812,11 @@ static struct inpcb *
 tcp_mtudisc_notify(struct inpcb *inp, int error)
 {
 
-	return (tcp_mtudisc(inp, -1));
+	tcp_mtudisc(inp, -1);
+	return (inp);
 }
 
-struct inpcb *
+static void
 tcp_mtudisc(struct inpcb *inp, int mtuoffer)
 {
 	struct tcpcb *tp;
@@ -1823,7 +1825,7 @@ tcp_mtudisc(struct inpcb *inp, int mtuof
 	INP_WLOCK_ASSERT(inp);
 	if ((inp->inp_flags & INP_TIMEWAIT) ||
 	    (inp->inp_flags & INP_DROPPED))
-		return (inp);
+		return;
 
 	tp = intotcpcb(inp);
 	KASSERT(tp != NULL, ("tcp_mtudisc: tp == NULL"));
@@ -1845,7 +1847,6 @@ tcp_mtudisc(struct inpcb *inp, int mtuof
 	if (tp->t_flags & TF_SACK_PERMIT)
 		EXIT_FASTRECOVERY(tp->t_flags);
 	tcp_output(tp);
-	return (inp);
 }
 
 #ifdef INET

Modified: head/sys/netinet/tcp_var.h
==============================================================================
--- head/sys/netinet/tcp_var.h	Fri Sep  4 10:16:21 2015	(r287459)
+++ head/sys/netinet/tcp_var.h	Fri Sep  4 12:02:12 2015	(r287460)
@@ -687,8 +687,6 @@ void	 tcp_mss(struct tcpcb *, int);
 int	 tcp_mssopt(struct in_conninfo *);
 struct inpcb *
 	 tcp_drop_syn_sent(struct inpcb *, int);
-struct inpcb *
-	 tcp_mtudisc(struct inpcb *, int);
 struct tcpcb *
 	 tcp_newtcpcb(struct inpcb *);
 int	 tcp_output(struct tcpcb *);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509041202.t84C2DZX028065>