aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorolivier <olivier@FreeBSD.org>2018-10-06 15:25:21 +0800
committerolivier <olivier@FreeBSD.org>2018-10-06 15:25:21 +0800
commit44d8f155b0d5b9141b876003b360ca24b6178b1d (patch)
treec6f71723703f5188202b2269ec053319a03c508d /net
parent31d30e7f452446a3c4edd6d279a1c0ea8c662085 (diff)
downloadfreebsd-ports-gnome-44d8f155b0d5b9141b876003b360ca24b6178b1d.tar.gz
freebsd-ports-gnome-44d8f155b0d5b9141b876003b360ca24b6178b1d.tar.zst
freebsd-ports-gnome-44d8f155b0d5b9141b876003b360ca24b6178b1d.zip
Fix 2 bugs into the RC script (restart and quietstart) and add ISIS patch.
PR: 231984 Submitted by: pautina@kharkiv.net
Diffstat (limited to 'net')
-rw-r--r--net/frr5/Makefile2
-rw-r--r--net/frr5/files/frr.in43
-rw-r--r--net/frr5/files/patch-isisd_isis__circuit.c51
3 files changed, 74 insertions, 22 deletions
diff --git a/net/frr5/Makefile b/net/frr5/Makefile
index 21b7de839ae2..ceb451a4b022 100644
--- a/net/frr5/Makefile
+++ b/net/frr5/Makefile
@@ -2,7 +2,7 @@
PORTNAME= frr
PORTVERSION= 5.0.1
-PORTREVISION= 2
+PORTREVISION= 3
DISTVERSIONPREFIX= frr-
CATEGORIES= net ipv6
PKGNAMESUFFIX= 5
diff --git a/net/frr5/files/frr.in b/net/frr5/files/frr.in
index 20dbdd3248e8..462d0a940a68 100644
--- a/net/frr5/files/frr.in
+++ b/net/frr5/files/frr.in
@@ -89,6 +89,7 @@ do_cmd()
{
local ret
ret=0
+ frr_cmd=$1
for daemon in ${frr_daemons}; do
command=%%PREFIX%%/sbin/${daemon}
required_files=%%ETCDIR%%/${daemon}.conf
@@ -118,11 +119,11 @@ frr_cmd=$1
case "$1" in
force*)
- frr_cmd=${frr_cmd#force}
- ;;
+ frr_cmd=${frr_cmd#force}
+ ;;
fast*)
- frr_cmd=${frr_cmd#fast}
- ;;
+ frr_cmd=${frr_cmd#fast}
+ ;;
esac
shift
@@ -131,24 +132,24 @@ if [ $# -ge 1 ]; then
fi
case "${frr_cmd}" in
- start)
- if [ -n "${frr_extralibs_path}" ]; then
- /sbin/ldconfig -m ${frr_extralibs_path}
- fi
- # Why should I need to add this check ?
- checkyesno frr_enable && do_cmd "start"
- ;;
+ start|quietstart)
+ if [ -n "${frr_extralibs_path}" ]; then
+ /sbin/ldconfig -m ${frr_extralibs_path}
+ fi
+ # Why should I need to add this check ?
+ checkyesno frr_enable && do_cmd "start"
+ ;;
stop)
- frr_daemons=$(reverse_list ${frr_daemons})
- do_cmd "stop"
- ;;
+ frr_daemons=$(reverse_list ${frr_daemons})
+ do_cmd "stop"
+ ;;
restart)
- frr_daemons=$(reverse_list ${frr_daemons})
- do_cmd "stop"
- frr_daemons=$(reverse_list ${frr_daemons})
- checkyesno frr_enable && do_cmd "start"
- ;;
+ frr_daemons=$(reverse_list ${frr_daemons})
+ do_cmd "stop"
+ frr_daemons=$(reverse_list ${frr_daemons})
+ checkyesno frr_enable && do_cmd "start"
+ ;;
*)
- do_cmd "${frr_cmd}"
- ;;
+ do_cmd "${frr_cmd}"
+ ;;
esac
diff --git a/net/frr5/files/patch-isisd_isis__circuit.c b/net/frr5/files/patch-isisd_isis__circuit.c
new file mode 100644
index 000000000000..51d42737d0cf
--- /dev/null
+++ b/net/frr5/files/patch-isisd_isis__circuit.c
@@ -0,0 +1,51 @@
+From d4670f515b7f62bfd8f9bdd750540245aab542c0 Mon Sep 17 00:00:00 2001
+From: Christian Franke <chris@opensourcerouting.org>
+Date: Tue, 17 Jul 2018 15:14:54 -0400
+Subject: [PATCH] isisd: don't crash when isis_sock_init fails
+
+When isis_sock_init fails in isis_circuit_up, isis_circuit_down would
+be called to cancel timers which were scheduled. However
+isis_circuit_down would immediately return, since the state had not been
+changed to 'UP' yet.
+
+Fix this by having isis_circuit_down always cancel all the timers.
+
+Signed-off-by: Christian Franke <chris@opensourcerouting.org>
+--- isisd/isis_circuit.c.orig 2018-07-05 07:40:17 UTC
++++ isisd/isis_circuit.c
+@@ -638,7 +638,7 @@ int isis_circuit_up(struct isis_circuit *circuit)
+ thread_add_timer(master, isis_run_dr_l2, circuit,
+ 2 * circuit->hello_interval[1],
+ &circuit->u.bc.t_run_dr[1]);
+- } else {
++ } else if (circuit->circ_type == CIRCUIT_T_P2P) {
+ /* initializing the hello send threads
+ * for a ptp IF
+ */
+@@ -682,9 +682,6 @@ int isis_circuit_up(struct isis_circuit *circuit)
+
+ void isis_circuit_down(struct isis_circuit *circuit)
+ {
+- if (circuit->state != C_STATE_UP)
+- return;
+-
+ /* Clear the flags for all the lsps of the circuit. */
+ isis_circuit_update_all_srmflags(circuit, 0);
+
+@@ -756,10 +753,12 @@ void isis_circuit_down(struct isis_circuit *circuit)
+ }
+
+ /* send one gratuitous hello to spead up convergence */
+- if (circuit->is_type & IS_LEVEL_1)
+- send_hello(circuit, IS_LEVEL_1);
+- if (circuit->is_type & IS_LEVEL_2)
+- send_hello(circuit, IS_LEVEL_2);
++ if (circuit->state == C_STATE_UP) {
++ if (circuit->is_type & IS_LEVEL_1)
++ send_hello(circuit, IS_LEVEL_1);
++ if (circuit->is_type & IS_LEVEL_2)
++ send_hello(circuit, IS_LEVEL_2);
++ }
+
+ circuit->upadjcount[0] = 0;
+ circuit->upadjcount[1] = 0;