diff options
author | melifaro <melifaro@FreeBSD.org> | 2013-12-01 05:25:21 +0800 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2013-12-01 05:25:21 +0800 |
commit | d00797a73a34ef70de2171a0770ba0a3d4db7bf7 (patch) | |
tree | 3c8fbba86dc37eee9b7d9d229203969ebba1ef68 /net/bird6 | |
parent | b130364cadb35f62d04a8ae5b6729d23c8494695 (diff) | |
download | freebsd-ports-gnome-d00797a73a34ef70de2171a0770ba0a3d4db7bf7.tar.gz freebsd-ports-gnome-d00797a73a34ef70de2171a0770ba0a3d4db7bf7.tar.zst freebsd-ports-gnome-d00797a73a34ef70de2171a0770ba0a3d4db7bf7.zip |
Update net/bird,net/bird6 to 1.4.0
Fix simultaneous building for firewall/aggregator protocols.
Reviewed by: az
Diffstat (limited to 'net/bird6')
-rw-r--r-- | net/bird6/Makefile | 3 | ||||
-rw-r--r-- | net/bird6/distinfo | 4 | ||||
-rw-r--r-- | net/bird6/files/patch-netst-proto.c | 51 | ||||
-rw-r--r-- | net/bird6/files/patch-proto-ospf-lsupd.c | 22 | ||||
-rw-r--r-- | net/bird6/files/patch-sysdep-unix-main.c | 118 |
5 files changed, 3 insertions, 195 deletions
diff --git a/net/bird6/Makefile b/net/bird6/Makefile index c8170dbd37b8..72c564cb7da9 100644 --- a/net/bird6/Makefile +++ b/net/bird6/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= bird6 -PORTVERSION= 1.3.11 -PORTREVISION= 1 +PORTVERSION= 1.4.0 CATEGORIES= net MASTER_SITES= ftp://bird.network.cz/pub/bird/ \ http://bird.mpls.in/distfiles/bird/ diff --git a/net/bird6/distinfo b/net/bird6/distinfo index e133f7c6365c..abe4022ccdbe 100644 --- a/net/bird6/distinfo +++ b/net/bird6/distinfo @@ -1,2 +1,2 @@ -SHA256 (bird-1.3.11.tar.gz) = cad6f58dfd8fef9772d46be3fe51a53420f56ee5fbd79d6993889ae6596a8495 -SIZE (bird-1.3.11.tar.gz) = 1108400 +SHA256 (bird-1.4.0.tar.gz) = da1b41cab26388b01d861c30afe41678df22dc9ea0110a14c1cc7b7bffc693c5 +SIZE (bird-1.4.0.tar.gz) = 1242728 diff --git a/net/bird6/files/patch-netst-proto.c b/net/bird6/files/patch-netst-proto.c deleted file mode 100644 index c15d6e487d1f..000000000000 --- a/net/bird6/files/patch-netst-proto.c +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/nest/proto.c b/nest/proto.c -index 60495aa..140ec94 100644 ---- nest/proto.c -+++ nest/proto.c -@@ -376,6 +376,7 @@ int proto_reconfig_type; /* Hack to propagate type info to pipe reconfigure hoo - static int - proto_reconfigure(struct proto *p, struct proto_config *oc, struct proto_config *nc, int type) - { -+ struct announce_hook *ah = p->main_ahook; - /* If the protocol is DOWN, we just restart it */ - if (p->proto_state == PS_DOWN) - return 0; -@@ -407,14 +408,31 @@ proto_reconfigure(struct proto *p, struct proto_config *oc, struct proto_config - - /* Update filters and limits in the main announce hook - Note that this also resets limit state */ -- if (p->main_ahook) -+ if (ah) - { -- p->main_ahook->in_filter = nc->in_filter; -- p->main_ahook->out_filter = nc->out_filter; -- p->main_ahook->rx_limit = nc->rx_limit; -- p->main_ahook->in_limit = nc->in_limit; -- p->main_ahook->out_limit = nc->out_limit; -- p->main_ahook->in_keep_filtered = nc->in_keep_filtered; -+ ah->in_filter = nc->in_filter; -+ ah->out_filter = nc->out_filter; -+ ah->rx_limit = nc->rx_limit; -+ ah->in_limit = nc->in_limit; -+ ah->out_limit = nc->out_limit; -+ ah->in_keep_filtered = nc->in_keep_filtered; -+ -+ if (p->proto_state == PS_UP) /* Recheck export/import/receive limit */ -+ { -+ struct proto_stats *stats = ah->stats; -+ struct proto_limit *l = ah->in_limit; -+ u32 all_routes = stats->imp_routes + stats->filt_routes; -+ -+ if (l && (stats->imp_routes >= l->limit)) proto_notify_limit(ah, l, PLD_IN, stats->imp_routes); -+ -+ l = ah->rx_limit; -+ -+ if (l && ( all_routes >= l->limit)) proto_notify_limit(ah, l, PLD_RX, all_routes ); -+ -+ l = ah->out_limit; -+ -+ if (l && ( stats->exp_routes >= l->limit)) proto_notify_limit(ah, l, PLD_OUT, stats->exp_routes); -+ } - } - - /* Update routes when filters changed. If the protocol in not UP, diff --git a/net/bird6/files/patch-proto-ospf-lsupd.c b/net/bird6/files/patch-proto-ospf-lsupd.c deleted file mode 100644 index bd25f3ad3bf4..000000000000 --- a/net/bird6/files/patch-proto-ospf-lsupd.c +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c -index a5da425..b19f261 100644 ---- proto/ospf/lsupd.c -+++ proto/ospf/lsupd.c -@@ -205,7 +205,7 @@ ospf_lsupd_flood(struct proto_ospf *po, - en->lsa_body = NULL; - DBG("Removing from lsreq list for neigh %R\n", nn->rid); - ospf_hash_delete(nn->lsrqh, en); -- if (EMPTY_SLIST(nn->lsrql)) -+ if ((EMPTY_SLIST(nn->lsrql)) && (nn->state == NEIGHBOR_LOADING)) - ospf_neigh_sm(nn, INM_LOADDONE); - continue; - break; -@@ -216,7 +216,7 @@ ospf_lsupd_flood(struct proto_ospf *po, - en->lsa_body = NULL; - DBG("Removing from lsreq list for neigh %R\n", nn->rid); - ospf_hash_delete(nn->lsrqh, en); -- if (EMPTY_SLIST(nn->lsrql)) -+ if ((EMPTY_SLIST(nn->lsrql)) && (nn->state == NEIGHBOR_LOADING)) - ospf_neigh_sm(nn, INM_LOADDONE); - break; - default: diff --git a/net/bird6/files/patch-sysdep-unix-main.c b/net/bird6/files/patch-sysdep-unix-main.c deleted file mode 100644 index 9caea0b791bf..000000000000 --- a/net/bird6/files/patch-sysdep-unix-main.c +++ /dev/null @@ -1,118 +0,0 @@ -diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c -index bd80ba2..c7db7c8 100644 ---- sysdep/unix/main.c -+++ sysdep/unix/main.c -@@ -473,6 +473,58 @@ cli_init_unix(uid_t use_uid, gid_t use_gid) - } - - /* -+ * PID file -+ */ -+ -+static char *pid_file; -+static int pid_fd; -+ -+static inline void -+open_pid_file(void) -+{ -+ if (!pid_file) -+ return; -+ -+ pid_fd = open(pid_file, O_WRONLY|O_CREAT, 0664); -+ if (pid_fd < 0) -+ die("Cannot create PID file %s: %m", pid_file); -+} -+ -+static inline void -+write_pid_file(void) -+{ -+ int pl, rv; -+ char ps[24]; -+ -+ if (!pid_file) -+ return; -+ -+ /* We don't use PID file for uniqueness, so no need for locking */ -+ -+ pl = bsnprintf(ps, sizeof(ps), "%ld\n", (long) getpid()); -+ if (pl < 0) -+ bug("PID buffer too small"); -+ -+ rv = ftruncate(pid_fd, 0); -+ if (rv < 0) -+ die("fruncate: %m"); -+ -+ rv = write(pid_fd, ps, pl); -+ if(rv < 0) -+ die("write: %m"); -+ -+ close(pid_fd); -+} -+ -+static inline void -+unlink_pid_file(void) -+{ -+ if (pid_file) -+ unlink(pid_file); -+} -+ -+ -+/* - * Shutdown - */ - -@@ -496,6 +548,7 @@ async_shutdown(void) - void - sysdep_shutdown_done(void) - { -+ unlink_pid_file(); - unlink(path_control_socket); - log_msg(L_FATAL "Shutdown completed"); - exit(0); -@@ -548,7 +601,7 @@ signal_init(void) - * Parsing of command-line arguments - */ - --static char *opt_list = "c:dD:ps:u:g:"; -+static char *opt_list = "c:dD:ps:P:u:g:"; - static int parse_and_exit; - char *bird_name; - static char *use_user; -@@ -557,7 +610,7 @@ static char *use_group; - static void - usage(void) - { -- fprintf(stderr, "Usage: %s [-c <config-file>] [-d] [-D <debug-file>] [-p] [-s <control-socket>] [-u <user>] [-g <group>]\n", bird_name); -+ fprintf(stderr, "Usage: %s [-c <config-file>] [-d] [-D <debug-file>] [-p] [-s <control-socket>] [-P <pid-file>] [-u <user>] [-g <group>]\n", bird_name); - exit(1); - } - -@@ -656,6 +709,9 @@ parse_args(int argc, char **argv) - case 's': - path_control_socket = optarg; - break; -+ case 'P': -+ pid_file = optarg; -+ break; - case 'u': - use_user = optarg; - break; -@@ -709,6 +765,9 @@ main(int argc, char **argv) - if (use_uid) - drop_uid(use_uid); - -+ if (!parse_and_exit) -+ open_pid_file(); -+ - protos_build(); - proto_build(&proto_unix_kernel); - proto_build(&proto_unix_iface); -@@ -733,6 +792,8 @@ main(int argc, char **argv) - dup2(0, 2); - } - -+ write_pid_file(); -+ - signal_init(); - - #ifdef LOCAL_DEBUG |