Rename two identically named log_in_vain variables: tcp_input.c's static
log_in_vain to tcp_log_in_vain, and udp_usrreq's global log_in_vain to udp_log_in_vain. MFC after: 1 week
This commit is contained in:
parent
3329b23659
commit
afdb42748d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166842
@ -105,9 +105,9 @@ struct tcpstat tcpstat;
|
||||
SYSCTL_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW,
|
||||
&tcpstat , tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)");
|
||||
|
||||
static int log_in_vain = 0;
|
||||
static int tcp_log_in_vain = 0;
|
||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_in_vain, CTLFLAG_RW,
|
||||
&log_in_vain, 0, "Log all incoming TCP connections");
|
||||
&tcp_log_in_vain, 0, "Log all incoming TCP connections");
|
||||
|
||||
static int blackhole = 0;
|
||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, blackhole, CTLFLAG_RW,
|
||||
@ -714,7 +714,7 @@ tcp_input(m, off0)
|
||||
* but should either do a listen or a connect soon.
|
||||
*/
|
||||
if (inp == NULL) {
|
||||
if (log_in_vain) {
|
||||
if (tcp_log_in_vain) {
|
||||
#ifdef INET6
|
||||
char dbuf[INET6_ADDRSTRLEN+2], sbuf[INET6_ADDRSTRLEN+2];
|
||||
#else
|
||||
@ -736,7 +736,7 @@ tcp_input(m, off0)
|
||||
strcpy(dbuf, inet_ntoa(ip->ip_dst));
|
||||
strcpy(sbuf, inet_ntoa(ip->ip_src));
|
||||
}
|
||||
switch (log_in_vain) {
|
||||
switch (tcp_log_in_vain) {
|
||||
case 1:
|
||||
if ((thflags & TH_SYN) == 0)
|
||||
break;
|
||||
|
@ -105,9 +105,9 @@ struct tcpstat tcpstat;
|
||||
SYSCTL_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW,
|
||||
&tcpstat , tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)");
|
||||
|
||||
static int log_in_vain = 0;
|
||||
static int tcp_log_in_vain = 0;
|
||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_in_vain, CTLFLAG_RW,
|
||||
&log_in_vain, 0, "Log all incoming TCP connections");
|
||||
&tcp_log_in_vain, 0, "Log all incoming TCP connections");
|
||||
|
||||
static int blackhole = 0;
|
||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, blackhole, CTLFLAG_RW,
|
||||
@ -714,7 +714,7 @@ tcp_input(m, off0)
|
||||
* but should either do a listen or a connect soon.
|
||||
*/
|
||||
if (inp == NULL) {
|
||||
if (log_in_vain) {
|
||||
if (tcp_log_in_vain) {
|
||||
#ifdef INET6
|
||||
char dbuf[INET6_ADDRSTRLEN+2], sbuf[INET6_ADDRSTRLEN+2];
|
||||
#else
|
||||
@ -736,7 +736,7 @@ tcp_input(m, off0)
|
||||
strcpy(dbuf, inet_ntoa(ip->ip_dst));
|
||||
strcpy(sbuf, inet_ntoa(ip->ip_src));
|
||||
}
|
||||
switch (log_in_vain) {
|
||||
switch (tcp_log_in_vain) {
|
||||
case 1:
|
||||
if ((thflags & TH_SYN) == 0)
|
||||
break;
|
||||
|
@ -105,9 +105,9 @@ static int udpcksum = 1;
|
||||
SYSCTL_INT(_net_inet_udp, UDPCTL_CHECKSUM, checksum, CTLFLAG_RW, &udpcksum,
|
||||
0, "");
|
||||
|
||||
int log_in_vain = 0;
|
||||
int udp_log_in_vain = 0;
|
||||
SYSCTL_INT(_net_inet_udp, OID_AUTO, log_in_vain, CTLFLAG_RW,
|
||||
&log_in_vain, 0, "Log all incoming UDP packets");
|
||||
&udp_log_in_vain, 0, "Log all incoming UDP packets");
|
||||
|
||||
static int blackhole = 0;
|
||||
SYSCTL_INT(_net_inet_udp, OID_AUTO, blackhole, CTLFLAG_RW, &blackhole, 0,
|
||||
@ -407,7 +407,7 @@ udp_input(struct mbuf *m, int off)
|
||||
inp = in_pcblookup_hash(&udbinfo, ip->ip_src, uh->uh_sport,
|
||||
ip->ip_dst, uh->uh_dport, 1, m->m_pkthdr.rcvif);
|
||||
if (inp == NULL) {
|
||||
if (log_in_vain) {
|
||||
if (udp_log_in_vain) {
|
||||
char buf[4*sizeof "123"];
|
||||
|
||||
strcpy(buf, inet_ntoa(ip->ip_dst));
|
||||
|
@ -98,7 +98,7 @@ extern struct inpcbinfo udbinfo;
|
||||
extern u_long udp_sendspace;
|
||||
extern u_long udp_recvspace;
|
||||
extern struct udpstat udpstat;
|
||||
extern int log_in_vain;
|
||||
extern int udp_log_in_vain;
|
||||
|
||||
void udp_ctlinput(int, struct sockaddr *, void *);
|
||||
void udp_init(void);
|
||||
|
@ -326,7 +326,7 @@ udp6_input(mp, offp, proto)
|
||||
&ip6->ip6_dst, uh->uh_dport, 1,
|
||||
m->m_pkthdr.rcvif);
|
||||
if (in6p == NULL) {
|
||||
if (log_in_vain) {
|
||||
if (udp_log_in_vain) {
|
||||
char ip6bufs[INET6_ADDRSTRLEN];
|
||||
char ip6bufd[INET6_ADDRSTRLEN];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user