FreeBSD Bugzilla – Attachment 98408 Details for
Bug 137317
[tcp] logs full of syncache problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-1.diff
patch-1.diff (text/plain), 2.40 KB, created by
Andre Oppermann
on 2010-08-17 10:20:42 UTC
(
hide
)
Description:
patch-1.diff
Filename:
MIME Type:
Creator:
Andre Oppermann
Created:
2010-08-17 10:20:42 UTC
Size:
2.40 KB
patch
obsolete
>Index: netinet/tcp_input.c >=================================================================== >--- netinet/tcp_input.c (revision 211411) >+++ netinet/tcp_input.c (working copy) >@@ -571,7 +571,7 @@ > */ > if ((tcp_log_in_vain == 1 && (thflags & TH_SYN)) || > tcp_log_in_vain == 2) { >- if ((s = tcp_log_addrs(NULL, th, (void *)ip, ip6))) >+ if ((s = tcp_log_vain(NULL, th, (void *)ip, ip6))) > log(LOG_INFO, "%s; %s: Connection attempt " > "to closed port\n", s, __func__); > } >Index: netinet/tcp_subr.c >=================================================================== >--- netinet/tcp_subr.c (revision 211411) >+++ netinet/tcp_subr.c (working copy) >@@ -268,6 +268,8 @@ > > static struct inpcb *tcp_notify(struct inpcb *, int); > static void tcp_isn_tick(void *); >+static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, >+ void *ip4hdr, const void *ip6hdr); > > /* > * Target size of TCP PCB hash tables. Must be a power of two. >@@ -2233,9 +2235,33 @@ > * and ip6_hdr pointers have to be passed as void pointers. > */ > char * >+tcp_log_vain(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, >+ const void *ip6hdr) >+{ >+ >+ /* Is logging enabled? */ >+ if (tcp_log_in_vain == 0) >+ return (NULL); >+ >+ return (tcp_log_addr(inc, th, ip4hdr, ip6hdr)); >+} >+ >+char * > tcp_log_addrs(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, > const void *ip6hdr) > { >+ >+ /* Is logging enabled? */ >+ if (tcp_log_debug == 0) >+ return (NULL); >+ >+ return (tcp_log_addr(inc, th, ip4hdr, ip6hdr)); >+} >+ >+static char * >+tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, >+ const void *ip6hdr) >+{ > char *s, *sp; > size_t size; > struct ip *ip; >@@ -2258,10 +2284,6 @@ > 2 * INET_ADDRSTRLEN; > #endif /* INET6 */ > >- /* Is logging enabled? */ >- if (tcp_log_debug == 0 && tcp_log_in_vain == 0) >- return (NULL); >- > s = malloc(size, M_TCPLOG, M_ZERO|M_NOWAIT); > if (s == NULL) > return (NULL); >Index: netinet/tcp_var.h >=================================================================== >--- netinet/tcp_var.h (revision 211411) >+++ netinet/tcp_var.h (working copy) >@@ -611,6 +611,8 @@ > void tcp_fini(void *); > char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, void *, > const void *); >+char *tcp_log_vain(struct in_conninfo *, struct tcphdr *, void *, >+ const void *); > int tcp_reass(struct tcpcb *, struct tcphdr *, int *, struct mbuf *); > void tcp_reass_init(void); > #ifdef VIMAGE
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 137317
: 98408