summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/tools/ipfs.c
diff options
context:
space:
mode:
authordarrenr <darrenr@FreeBSD.org>2007-06-04 02:50:28 +0000
committerdarrenr <darrenr@FreeBSD.org>2007-06-04 02:50:28 +0000
commite2e28d4361fc9bdb67694eedaf349bdc7ca088a3 (patch)
treef9efeb29d9992430924bdce513e7199c9397ac36 /contrib/ipfilter/tools/ipfs.c
parent092f5d1218f4867a87b382d75613b9d2b3e56c18 (diff)
downloadFreeBSD-src-e2e28d4361fc9bdb67694eedaf349bdc7ca088a3.zip
FreeBSD-src-e2e28d4361fc9bdb67694eedaf349bdc7ca088a3.tar.gz
Import IPFilter 4.1.23 to vendor branch.
See src/contrib/ipfilter/HISTORY for details of changes since 4.1.13
Diffstat (limited to 'contrib/ipfilter/tools/ipfs.c')
-rw-r--r--contrib/ipfilter/tools/ipfs.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/contrib/ipfilter/tools/ipfs.c b/contrib/ipfilter/tools/ipfs.c
index 4479d19..3acb5d4 100644
--- a/contrib/ipfilter/tools/ipfs.c
+++ b/contrib/ipfilter/tools/ipfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1999-2001, 2003 by Darren Reed.
+ * Copyright (C) 2001-2006 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*/
@@ -131,6 +131,14 @@ char *ifs, *fname;
strcpy(ips.ips_is.is_ifname[1], s);
rw = 1;
}
+ if (!strncmp(ips.ips_is.is_ifname[2], ifs, olen + 1)) {
+ strcpy(ips.ips_is.is_ifname[2], s);
+ rw = 1;
+ }
+ if (!strncmp(ips.ips_is.is_ifname[3], ifs, olen + 1)) {
+ strcpy(ips.ips_is.is_ifname[3], s);
+ rw = 1;
+ }
if (rw == 1) {
if (lseek(fd, pos, SEEK_SET) != pos) {
perror("lseek");
@@ -188,6 +196,14 @@ char *ifs, *fname;
strcpy(nat->nat_ifnames[1], s);
rw = 1;
}
+ if (!strncmp(nat->nat_ifnames[2], ifs, olen + 1)) {
+ strcpy(nat->nat_ifnames[2], s);
+ rw = 1;
+ }
+ if (!strncmp(nat->nat_ifnames[3], ifs, olen + 1)) {
+ strcpy(nat->nat_ifnames[3], s);
+ rw = 1;
+ }
if (rw == 1) {
if (lseek(fd, pos, SEEK_SET) != pos) {
perror("lseek");
@@ -214,7 +230,7 @@ char *argv[];
char *dirname = NULL, *filename = NULL, *ifs = NULL;
progname = argv[0];
- while ((c = getopt(argc, argv, "d:f:lNnSRruvWw")) != -1)
+ while ((c = getopt(argc, argv, "d:f:i:lNnSRruvWw")) != -1)
switch (c)
{
case 'd' :
OpenPOWER on IntegriCloud