Fix cast-qualifiers warning when INET6 is not present

Approved by:  re (rwatson)
This commit is contained in:
Peter Wemm 2007-07-05 05:55:57 +00:00
parent 22af4cab91
commit 9fb5d4c064
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171229
3 changed files with 3 additions and 4 deletions

View File

@ -469,8 +469,7 @@ tcp_input(struct mbuf *m, int off0)
*/
if ((tcp_log_in_vain == 1 && (thflags & TH_SYN)) ||
tcp_log_in_vain == 2) {
if ((s = tcp_log_addrs(NULL, th, (void *)ip,
(void *)ip6)))
if ((s = tcp_log_addrs(NULL, th, (void *)ip, ip6)))
log(LOG_INFO, "%s; %s: Connection attempt "
"to closed port\n", s, __func__);
}

View File

@ -2066,7 +2066,7 @@ SYSCTL_PROC(_net_inet_tcp, TCPCTL_DROP, drop,
*/
char *
tcp_log_addrs(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr,
void *ip6hdr)
const void *ip6hdr)
{
char *s, *sp;
size_t size;

View File

@ -523,7 +523,7 @@ void tcp_fasttimo(void);
void tcp_init(void);
void tcp_fini(void *);
char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, void *,
void *);
const void *);
int tcp_reass(struct tcpcb *, struct tcphdr *, int *, struct mbuf *);
void tcp_reass_init(void);
void tcp_input(struct mbuf *, int);