Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 2008 22:11:22 GMT
From:      Andre Oppermann <andre@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 141066 for review
Message-ID:  <200805022211.m42MBMdj008707@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=141066

Change 141066 by andre@andre_flirtbox on 2008/05/02 22:10:30

	Add logging of failures to tcp_ouput().

Affected files ...

.. //depot/projects/tcp_reass/netinet/tcp_output.c#6 edit

Differences ...

==== //depot/projects/tcp_reass/netinet/tcp_output.c#6 (text+ko) ====

@@ -49,6 +49,7 @@
 #include <sys/socket.h>
 #include <sys/socketvar.h>
 #include <sys/sysctl.h>
+#include <sys/syslog.h>
 
 #include <net/route.h>
 
@@ -131,7 +132,7 @@
 	struct mbuf *m;
 	struct ip *ip = NULL;
 	struct ipovly *ipov = NULL;
-	struct tcphdr *th;
+	struct tcphdr *th = NULL;
 	u_char opt[TCP_MAXOLEN];
 	unsigned ipoptlen, optlen, hdrlen;
 #ifdef IPSEC
@@ -142,6 +143,7 @@
 	struct sackhole *p;
 	int tso = 0;
 	struct tcpopt to;
+	char *s;
 #if 0
 	int maxburst = TCP_MAXBURST;
 #endif
@@ -1164,6 +1166,13 @@
 		}
 out:
 		SOCKBUF_UNLOCK_ASSERT(&so->so_snd);	/* Check gotos. */
+
+		if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, NULL, NULL, NULL))) {
+			log(LOG_DEBUG, "%s; %s: error %i while sending\n",
+			    s, __func__, error);
+			free(s, M_TCPLOG);
+		}
+
 		switch (error) {
 		case EPERM:
 			tp->t_softerror = error;



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