diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ifstated/Makefile | 2 | ||||
-rw-r--r-- | net/ifstated/distinfo | 4 | ||||
-rw-r--r-- | net/ifstated/files/patch-Makefile | 12 | ||||
-rw-r--r-- | net/ifstated/files/patch-etc-ifstated.conf | 20 | ||||
-rw-r--r-- | net/ifstated/files/patch-ifstated.8 | 6 | ||||
-rw-r--r-- | net/ifstated/files/patch-ifstated.c | 44 | ||||
-rw-r--r-- | net/ifstated/files/patch-ifstated.h | 4 | ||||
-rw-r--r-- | net/ifstated/files/patch-parse.y | 8 |
8 files changed, 49 insertions, 51 deletions
diff --git a/net/ifstated/Makefile b/net/ifstated/Makefile index 6791cca431e5..e8f319fc0006 100644 --- a/net/ifstated/Makefile +++ b/net/ifstated/Makefile @@ -6,7 +6,7 @@ # PORTNAME= ifstated -PORTVERSION= 20041117 +PORTVERSION= 20050505 CATEGORIES= net MASTER_SITES= ftp://ftp.secureworks.net/pub/ifstated/ diff --git a/net/ifstated/distinfo b/net/ifstated/distinfo index 31c0d0a77144..ae007415b513 100644 --- a/net/ifstated/distinfo +++ b/net/ifstated/distinfo @@ -1,2 +1,2 @@ -MD5 (ifstated-20041117.tar.gz) = 3255839ec706b5c40b7445677a8e7aa9 -SIZE (ifstated-20041117.tar.gz) = 12270 +MD5 (ifstated-20050505.tar.gz) = 33faa596ababdc1133fbea840827b52a +SIZE (ifstated-20050505.tar.gz) = 12341 diff --git a/net/ifstated/files/patch-Makefile b/net/ifstated/files/patch-Makefile index a43c80c8b14d..d552b6577f47 100644 --- a/net/ifstated/files/patch-Makefile +++ b/net/ifstated/files/patch-Makefile @@ -1,14 +1,14 @@ ---- Makefile 18 Nov 2004 21:43:12 -0000 1.1.1.1 -+++ Makefile 18 Nov 2004 23:33:55 -0000 1.4 +--- ../ifstated-20050505.orig/Makefile Thu May 5 11:51:24 2005 ++++ Makefile Thu May 5 12:06:07 2005 @@ -1,4 +1,5 @@ - # $OpenBSD: Makefile,v 1.3 2004/02/05 02:26:23 mcbride Exp $ -+# $Id: Makefile,v 1.4 2004/11/18 23:33:55 mdg Exp $ + # $OpenBSD: Makefile,v 1.4 2004/12/14 10:24:15 mpf Exp $ ++# $Id: Makefile,v 1.5 2005/05/05 16:06:07 mdg Exp $ PROG= ifstated SRCS= ifstated.c parse.y -@@ -7,6 +8,14 @@ - CLFAGS+= -Wmissing-declarations -Wredundant-decls +@@ -8,6 +9,14 @@ CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual + YFLAGS= MAN= ifstated.8 -LDADD+=-lutil -levent + diff --git a/net/ifstated/files/patch-etc-ifstated.conf b/net/ifstated/files/patch-etc-ifstated.conf index 2adb701099f7..b7324053a962 100644 --- a/net/ifstated/files/patch-etc-ifstated.conf +++ b/net/ifstated/files/patch-etc-ifstated.conf @@ -1,8 +1,8 @@ ---- etc/ifstated.conf 18 Nov 2004 21:43:12 -0000 1.1.1.1 -+++ etc/ifstated.conf 18 Nov 2004 21:48:39 -0000 1.2 +--- ../ifstated-20050505.orig/etc/ifstated.conf Thu May 5 11:51:24 2005 ++++ etc/ifstated.conf Thu May 5 12:06:08 2005 @@ -1,4 +1,5 @@ - # $OpenBSD: ifstated.conf,v 1.4 2004/04/28 01:01:27 deraadt Exp $ -+# $Id: ifstated.conf,v 1.2 2004/11/18 21:48:39 mdg Exp $ + # $OpenBSD: ifstated.conf,v 1.6 2005/02/07 06:08:10 david Exp $ ++# $Id: ifstated.conf,v 1.3 2005/05/05 16:06:08 mdg Exp $ # This is a sample config for a pair of firewalls with two interfaces # # carp0 and carp1 have ip addresses on 192.168.3.0/24 and 192.168.6.0/24 @@ -14,21 +14,21 @@ +init-state primary # init-state backup - carp_up = "((carp0 link up) and (carp1 link up))" + carp_up = "carp0.link.up && carp1.link.up" @@ -18,12 +19,12 @@ # The "net" addresses are other addresses which can be used to determine # whether we have connectivity. Make sure the hosts are always up, or # test multiple ip's, 'or'-ing the tests. --net = '( "ping -q -c 1 -w 1 192.168.6.8 > /dev/null" every 10 and \ +-net = '( "ping -q -c 1 -w 1 192.168.6.8 > /dev/null" every 10 && \ - "ping -q -c 1 -w 1 192.168.3.8 > /dev/null" every 10)' -+net = '( "ping -q -c 1 -t 1 192.168.6.8 > /dev/null" every 10 and \ ++net = '( "ping -q -c 1 -t 1 192.168.6.8 > /dev/null" every 10 && \ + "ping -q -c 1 -t 1 192.168.3.8 > /dev/null" every 10)' # The peer addresses below are the real ip addresses of the OTHER firewall --peer = '( "ping -q -c 1 -w 1 192.168.6.7 > /dev/null" every 10 and \ +-peer = '( "ping -q -c 1 -w 1 192.168.6.7 > /dev/null" every 10 && \ - "ping -q -c 1 -w 1 192.168.3.7 > /dev/null" every 10)' -+peer = '( "ping -q -c 1 -t 1 192.168.6.7 > /dev/null" every 10 and \ ++peer = '( "ping -q -c 1 -t 1 192.168.6.7 > /dev/null" every 10 && \ + "ping -q -c 1 -t 1 192.168.3.7 > /dev/null" every 10)' state auto { - if $carp_up { + if $carp_up diff --git a/net/ifstated/files/patch-ifstated.8 b/net/ifstated/files/patch-ifstated.8 index a4fcc6d55365..97d7f7b94538 100644 --- a/net/ifstated/files/patch-ifstated.8 +++ b/net/ifstated/files/patch-ifstated.8 @@ -1,8 +1,8 @@ ---- ifstated.8 18 Nov 2004 21:43:12 -0000 1.1.1.1 -+++ ifstated.8 18 Nov 2004 22:14:58 -0000 1.3 +--- ../ifstated-20050505.orig/ifstated.8 Thu May 5 11:51:24 2005 ++++ ifstated.8 Thu May 5 12:06:07 2005 @@ -1,4 +1,5 @@ .\" $OpenBSD: ifstated.8,v 1.5 2004/09/27 22:26:26 jaredy Exp $ -+.\" $Id: ifstated.8,v 1.3 2004/11/18 22:14:58 mdg Exp $ ++.\" $Id: ifstated.8,v 1.4 2005/05/05 16:06:07 mdg Exp $ .\" .\" Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org> .\" diff --git a/net/ifstated/files/patch-ifstated.c b/net/ifstated/files/patch-ifstated.c index f8d69840141c..981ff64c2ffe 100644 --- a/net/ifstated/files/patch-ifstated.c +++ b/net/ifstated/files/patch-ifstated.c @@ -1,8 +1,8 @@ ---- ifstated.c 18 Nov 2004 21:43:12 -0000 1.1.1.1 -+++ ifstated.c 18 Nov 2004 21:48:39 -0000 1.2 +--- ../ifstated-20050505.orig/ifstated.c Thu May 5 11:51:24 2005 ++++ ifstated.c Thu May 5 12:06:07 2005 @@ -1,4 +1,5 @@ - /* $OpenBSD: ifstated.c,v 1.20 2004/10/05 21:17:02 mpf Exp $ */ -+/* $Id: ifstated.c,v 1.2 2004/11/18 21:48:39 mdg Exp $ */ + /* $OpenBSD: ifstated.c,v 1.21 2005/02/07 12:38:44 mcbride Exp $ */ ++/* $Id: ifstated.c,v 1.3 2005/05/05 16:06:07 mdg Exp $ */ /* * Copyright (c) 2004 Marco Pfatschbacher <mpf@openbsd.org> @@ -53,16 +53,16 @@ void external_async_exec(struct ifsd_external *); void check_external_status(struct ifsd_state *); void external_evtimer_setup(struct ifsd_state *, int); -@@ -76,6 +78,8 @@ +@@ -75,6 +77,8 @@ void remove_expression(struct ifsd_expression *, struct ifsd_state *); void log_init(int); - void logit(int level, const char *fmt, ...); + void logit(int, const char *, ...); +int get_ifcount(void); +int get_ifmib_general(int, struct ifmibdata *); void usage(void) -@@ -90,7 +94,7 @@ +@@ -89,7 +93,7 @@ int main(int argc, char *argv[]) { @@ -71,7 +71,7 @@ int ch; while ((ch = getopt(argc, argv, "dD:f:hniv")) != -1) { -@@ -137,26 +141,54 @@ +@@ -136,26 +140,54 @@ setproctitle(NULL); } @@ -135,7 +135,7 @@ if (load_config() != 0) { logit(IFSD_LOG_NORMAL, "unable to load config"); -@@ -166,18 +198,20 @@ +@@ -165,18 +197,20 @@ if ((rt_fd = socket(PF_ROUTE, SOCK_RAW, 0)) < 0) err(1, "no routing socket"); @@ -162,7 +162,7 @@ { logit(IFSD_LOG_NORMAL, "reloading config"); if (load_config() != 0) -@@ -208,7 +242,7 @@ +@@ -207,7 +241,7 @@ } void @@ -171,7 +171,7 @@ { char msg[2048]; struct rt_msghdr *rtm = (struct rt_msghdr *)&msg; -@@ -246,22 +280,6 @@ +@@ -245,22 +279,6 @@ } void @@ -194,7 +194,7 @@ external_async_exec(struct ifsd_external *external) { char *argp[] = {"sh", "-c", NULL, NULL}; -@@ -355,23 +373,25 @@ +@@ -354,23 +372,25 @@ external_evtimer_setup(struct ifsd_state *state, int action) { struct ifsd_external *external; @@ -210,8 +210,7 @@ TAILQ_FOREACH(external, &state->external_tests, entries) { - struct timeval tv; -- -+ + /* run it once right away */ external_async_exec(external); @@ -227,7 +226,7 @@ } break; case IFSD_EVTIMER_DEL: -@@ -381,7 +401,9 @@ +@@ -380,7 +400,9 @@ kill(external->pid, SIGKILL); external->pid = 0; } @@ -238,7 +237,7 @@ } break; } -@@ -505,7 +527,6 @@ +@@ -504,7 +526,6 @@ logit(IFSD_LOG_NORMAL, "changing state to %s", conf->nextstate->name); if (conf->curstate != NULL) { @@ -246,7 +245,7 @@ external_evtimer_setup(conf->curstate, IFSD_EVTIMER_DEL); } -@@ -551,6 +572,48 @@ +@@ -550,6 +571,48 @@ } } @@ -295,7 +294,7 @@ /* * Fetch the current link states. */ -@@ -560,29 +623,34 @@ +@@ -559,29 +622,34 @@ struct ifaddrs *ifap, *ifa; char *oname = NULL; int sock = socket(AF_INET, SOCK_DGRAM, 0); @@ -318,16 +317,15 @@ - strlcpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name)); - ifr.ifr_data = (caddr_t)&ifrdat; -- -- if (ioctl(sock, SIOCGIFDATA, (caddr_t)&ifr) == -1) -- continue; + for (i = 1; i <= ifcount; i++) + { + get_ifmib_general(i, &ifmd); + if (! strcmp(ifmd.ifmd_name, oname)) + break; + } -+ + +- if (ioctl(sock, SIOCGIFDATA, (caddr_t)&ifr) == -1) +- continue; + ifdata = ifmd.ifmd_data; scan_ifstate(if_nametoindex(ifa->ifa_name), @@ -340,7 +338,7 @@ } freeifaddrs(ifap); close(sock); -@@ -664,7 +732,6 @@ +@@ -663,7 +731,6 @@ TAILQ_REMOVE(&state->external_tests, expression->u.external, entries); free(expression->u.external->command); diff --git a/net/ifstated/files/patch-ifstated.h b/net/ifstated/files/patch-ifstated.h index 92a4ecbcd8d8..e5421be2c755 100644 --- a/net/ifstated/files/patch-ifstated.h +++ b/net/ifstated/files/patch-ifstated.h @@ -1,5 +1,5 @@ ---- ifstated.h 18 Nov 2004 21:43:12 -0000 1.1.1.1 -+++ ifstated.h 18 Nov 2004 21:48:39 -0000 1.2 +--- ../ifstated-20050505.orig/ifstated.h Thu May 5 11:51:24 2005 ++++ ifstated.h Thu Nov 18 16:48:39 2004 @@ -1,4 +1,5 @@ /* $OpenBSD: ifstated.h,v 1.4 2004/03/10 00:13:38 deraadt Exp $ */ +/* $Id: ifstated.h,v 1.2 2004/11/18 21:48:39 mdg Exp $ */ diff --git a/net/ifstated/files/patch-parse.y b/net/ifstated/files/patch-parse.y index 1c577c9cb55f..797593185b6a 100644 --- a/net/ifstated/files/patch-parse.y +++ b/net/ifstated/files/patch-parse.y @@ -1,8 +1,8 @@ ---- parse.y 18 Nov 2004 21:43:12 -0000 1.1.1.1 -+++ parse.y 18 Nov 2004 21:48:39 -0000 1.2 +--- ../ifstated-20050505.orig/parse.y Thu May 5 11:51:24 2005 ++++ parse.y Thu May 5 12:06:07 2005 @@ -1,4 +1,5 @@ - /* $OpenBSD: parse.y,v 1.7 2004/04/28 01:00:50 deraadt Exp $ */ -+/* $Id: parse.y,v 1.2 2004/11/18 21:48:39 mdg Exp $ */ + /* $OpenBSD: parse.y,v 1.9 2005/02/07 12:41:53 mcbride Exp $ */ ++/* $Id: parse.y,v 1.3 2005/05/05 16:06:07 mdg Exp $ */ /* * Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org> |