diff options
author | sem <sem@FreeBSD.org> | 2009-08-21 19:27:49 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2009-08-21 19:27:49 +0800 |
commit | 39a29baee1bd2fa9a9bb8b800c66868a000baf46 (patch) | |
tree | 59d9dbd10c49b13fd564aaa55a6183a92ae63d28 /net | |
parent | fba617c18c23df774be89c7a4482048cdcc8b59d (diff) | |
download | freebsd-ports-gnome-39a29baee1bd2fa9a9bb8b800c66868a000baf46.tar.gz freebsd-ports-gnome-39a29baee1bd2fa9a9bb8b800c66868a000baf46.tar.zst freebsd-ports-gnome-39a29baee1bd2fa9a9bb8b800c66868a000baf46.zip |
- Vendor patch from git: do not touch socket before pidfile locking
Approved by: maintainer (implicitly)
Diffstat (limited to 'net')
-rw-r--r-- | net/quagga/Makefile | 2 | ||||
-rw-r--r-- | net/quagga/files/patch-git-2-pidfile-lock-fix | 59 |
2 files changed, 60 insertions, 1 deletions
diff --git a/net/quagga/Makefile b/net/quagga/Makefile index 97950688f2e6..a826589beea5 100644 --- a/net/quagga/Makefile +++ b/net/quagga/Makefile @@ -7,7 +7,7 @@ PORTNAME= quagga PORTVERSION= 0.99.14 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net ipv6 MASTER_SITES= http://quagga.net/download/ \ http://www.ru.quagga.net/download/ \ diff --git a/net/quagga/files/patch-git-2-pidfile-lock-fix b/net/quagga/files/patch-git-2-pidfile-lock-fix new file mode 100644 index 000000000000..6d614a4082e8 --- /dev/null +++ b/net/quagga/files/patch-git-2-pidfile-lock-fix @@ -0,0 +1,59 @@ +diff --git a/zebra/main.c b/zebra/main.c +index 14b0273..2d6a4ac 100644 +--- zebra/main.c ++++ zebra/main.c +@@ -382,6 +382,9 @@ main (int argc, char **argv) + /* Needed for BSD routing socket. */ + pid = getpid (); + ++ /* This must be done only after locking pidfile (bug #403). */ ++ zebra_zserv_socket_init (); ++ + /* Make vty server socket. */ + vty_serv_sock (vty_addr, vty_port, ZEBRA_VTYSH_PATH); + +diff --git a/zebra/zserv.c b/zebra/zserv.c +index a566e6d..cb5e411 100644 +--- zebra/zserv.c ++++ zebra/zserv.c +@@ -1704,13 +1704,6 @@ zebra_init (void) + /* Client list init. */ + zebrad.client_list = list_new (); + +- /* Make zebra server socket. */ +-#ifdef HAVE_TCP_ZEBRA +- zebra_serv (); +-#else +- zebra_serv_un (ZEBRA_SERV_PATH); +-#endif /* HAVE_TCP_ZEBRA */ +- + /* Install configuration write function. */ + install_node (&table_node, config_write_table); + install_node (&forwarding_node, config_write_forwarding); +@@ -1737,3 +1730,14 @@ zebra_init (void) + /* Route-map */ + zebra_route_map_init (); + } ++ ++/* Make zebra server socket, wiping any existing one (see bug #403). */ ++void ++zebra_zserv_socket_init (void) ++{ ++#ifdef HAVE_TCP_ZEBRA ++ zebra_serv (); ++#else ++ zebra_serv_un (ZEBRA_SERV_PATH); ++#endif /* HAVE_TCP_ZEBRA */ ++} +diff --git a/zebra/zserv.h b/zebra/zserv.h +index 87a33a4..a737183 100644 +--- zebra/zserv.h ++++ zebra/zserv.h +@@ -89,6 +89,7 @@ struct zebra_t + /* Prototypes. */ + extern void zebra_init (void); + extern void zebra_if_init (void); ++extern void zebra_zserv_socket_init (void); + extern void hostinfo_get (void); + extern void rib_init (void); + extern void interface_list (void); |