diff options
| author | Alfred Perlstein <alfred@FreeBSD.org> | 2000-12-14 23:35:57 +0000 |
|---|---|---|
| committer | Alfred Perlstein <alfred@FreeBSD.org> | 2000-12-14 23:35:57 +0000 |
| commit | 5af128b21ea6faa7e245406021c20e05b9e9f33a (patch) | |
| tree | dd29202a757592a0bbf32be2461f6cfbab1a7a83 /contrib | |
| parent | 8261e44cef1609ade427afe1c5a1d05d0d19589d (diff) | |
Notes
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/ipfilter/ipsend/sock.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index a998c90a925b..a64159226842 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -283,12 +283,21 @@ struct tcpiphdr *ti; return NULL; fd = (struct filedesc *)malloc(sizeof(*fd)); +#if defined( __FreeBSD_version) && __FreeBSD_version >= 500013 + if (KMCPY(fd, p->ki_fd, sizeof(*fd)) == -1) + { + fprintf(stderr, "read(%#lx,%#lx) failed\n", + (u_long)p, (u_long)p->ki_fd); + return NULL; + } +#else if (KMCPY(fd, p->kp_proc.p_fd, sizeof(*fd)) == -1) { fprintf(stderr, "read(%#lx,%#lx) failed\n", (u_long)p, (u_long)p->kp_proc.p_fd); return NULL; } +#endif o = (struct file **)calloc(1, sizeof(*o) * (fd->fd_lastfile + 1)); if (KMCPY(o, fd->fd_ofiles, (fd->fd_lastfile + 1) * sizeof(*o)) == -1) |
