diff options
author | Darren Reed <darrenr@FreeBSD.org> | 2000-08-13 04:58:02 +0000 |
---|---|---|
committer | Darren Reed <darrenr@FreeBSD.org> | 2000-08-13 04:58:02 +0000 |
commit | f345cd2b83cb22b57029f3252ab0431b366cdc13 (patch) | |
tree | 73c5d7610005d77ef48ecc4df40b50c23486a0dc /contrib/ipfilter/ipf.c | |
parent | 02aea5e854e9f95720fb6724c7a9e965f42c434e (diff) | |
download | src-f345cd2b83cb22b57029f3252ab0431b366cdc13.tar.gz src-f345cd2b83cb22b57029f3252ab0431b366cdc13.zip |
Import base ipfilter 3.4.9 into contrib dir.
Notes
Notes:
svn path=/vendor/ipfilter/dist/; revision=64588
Diffstat (limited to 'contrib/ipfilter/ipf.c')
-rw-r--r-- | contrib/ipfilter/ipf.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/contrib/ipfilter/ipf.c b/contrib/ipfilter/ipf.c index a1a0bfcf0182..36448b4aaa1f 100644 --- a/contrib/ipfilter/ipf.c +++ b/contrib/ipfilter/ipf.c @@ -43,7 +43,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)ipf.c 1.23 6/5/96 (C) 1993-2000 Darren Reed"; -static const char rcsid[] = "@(#)$Id: ipf.c,v 2.10.2.1 2000/07/08 02:19:46 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id: ipf.c,v 2.10.2.3 2000/08/07 14:54:05 darrenr Exp $"; #endif #if SOLARIS @@ -558,13 +558,21 @@ static void showversion() struct friostat *fiop=&fio; u_32_t flags; char *s; + int vfd; printf("ipf: %s (%d)\n", IPL_VERSION, (int)sizeof(frentry_t)); - if (opendevice(ipfname) != -2 && ioctl(fd, SIOCGETFS, &fiop)) { + if ((vfd = open(ipfname, O_RDONLY)) == -1) { + perror("open device"); + return; + } + + if (ioctl(vfd, SIOCGETFS, &fiop)) { perror("ioctl(SIOCGETFS"); + close(vfd); return; } + close(vfd); flags = get_flags(); printf("Kernel: %-*.*s\n", (int)sizeof(fio.f_version), |