summarylogtreecommitdiffstats
path: root/frr_7.4_Archlinux.patch
blob: 0a1036944e84985448af9b776e6fbdaf67783526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
diff -ru frr-frr-7.4/lib/table.h /home/eugeneai/tmp/frr-new/src/frr-frr-7.4/lib/table.h
--- frr-frr-7.4/lib/table.h	2020-06-30 19:08:57.000000000 +0800
+++ /home/eugeneai/tmp/frr-new/src/frr-frr-7.4/lib/table.h	2020-10-11 03:06:11.822840367 +0800
@@ -248,7 +248,7 @@
 /* Lock node. */
 static inline struct route_node *route_lock_node(struct route_node *node)
 {
-	(*(unsigned *)&node->lock)++;
+	node->lock+=1;
 	return node;
 }
 
@@ -256,7 +256,7 @@
 static inline void route_unlock_node(struct route_node *node)
 {
 	assert(node->lock > 0);
-	(*(unsigned *)&node->lock)--;
+	node->lock-=1;
 
 	if (node->lock == 0)
 		route_node_delete(node);
diff -Naupr frr-frr-7.3_orig/tools/etc/frr/daemons frr-frr-7.3/tools/etc/frr/daemons
--- frr-frr-7.3_orig/tools/etc/frr/daemons	2020-02-14 21:03:09.000000000 +0700
+++ frr-frr-7.3/tools/etc/frr/daemons	2020-02-26 15:20:16.080215154 +0700
@@ -30,6 +30,8 @@ pbrd=no
 bfdd=no
 fabricd=no
 vrrpd=no
+zebra=yes
+#ospfd_instances="1,2,3"
 
 #
 # If this option is set the /etc/init.d/frr script automatically loads
@@ -37,24 +39,24 @@ vrrpd=no
 # Check /etc/pam.d/frr if you intend to use "vtysh"!
 #
 vtysh_enable=yes
-zebra_options="  -A 127.0.0.1 -s 90000000"
-bgpd_options="   -A 127.0.0.1"
-ospfd_options="  -A 127.0.0.1"
-ospf6d_options=" -A ::1"
-ripd_options="   -A 127.0.0.1"
-ripngd_options=" -A ::1"
-isisd_options="  -A 127.0.0.1"
-pimd_options="   -A 127.0.0.1"
-ldpd_options="   -A 127.0.0.1"
-nhrpd_options="  -A 127.0.0.1"
-eigrpd_options=" -A 127.0.0.1"
-babeld_options=" -A 127.0.0.1"
-sharpd_options=" -A 127.0.0.1"
-pbrd_options="   -A 127.0.0.1"
-staticd_options="-A 127.0.0.1"
-bfdd_options="   -A 127.0.0.1"
-fabricd_options="-A 127.0.0.1"
-vrrpd_options="  -A 127.0.0.1"
+zebra_options="  -A 127.0.0.1 -s 90000000 -d -f /etc/frr/zebra.conf"
+bgpd_options="   -A 127.0.0.1 -d -f /etc/frr/bgpd.conf"
+ospfd_options="  -A 127.0.0.1 -d -f /etc/frr/ospfd.conf"
+ospf6d_options=" -A ::1 -d -f /etc/frr/ospf6d.conf"
+ripd_options="   -A 127.0.0.1 -d -f /etc/frr/ripd.conf"
+ripngd_options=" -A ::1 -d -f /etc/frr/ripngd.conf"
+isisd_options="  -A 127.0.0.1 -d -f /etc/frr/isisd.conf"
+pimd_options="   -A 127.0.0.1 -d -f /etc/frr/pimd.conf"
+ldpd_options="   -A 127.0.0.1 -d -f /etc/frr/ldpd.conf"
+nhrpd_options="  -A 127.0.0.1 -d -f /etc/frr/nhrdp.conf"
+eigrpd_options=" -A 127.0.0.1 -d -f /etc/frr/eigrpd.conf"
+babeld_options=" -A 127.0.0.1 -d -f /etc/frr/babeld.conf"
+sharpd_options=" -A 127.0.0.1 -d -f /etc/frr/sharpd.conf"
+pbrd_options="   -A 127.0.0.1 -d -f /etc/frr/pbrd.conf"
+staticd_options="-A 127.0.0.1 -d -f /etc/frr/staticd.conf"
+bfdd_options="   -A 127.0.0.1 -d -f /etc/frr/bfdd.conf"
+fabricd_options="-A 127.0.0.1 -d -f /etc/frr/fabricd.conf"
+vrrpd_options="  -A 127.0.0.1 -d -f /etc/frr/vrrpd.conf"
 
 # configuration profile
 #
@@ -70,7 +72,8 @@ vrrpd_options="  -A 127.0.0.1"
 #MAX_FDS=1024
 
 # The list of daemons to watch is automatically generated by the init script.
-#watchfrr_options=""
+watchfrr_enable=yes
+watchfrr_options="-d -r '/usr/bin/frr restart %s' -s '/usr/bin/frr start %s' -k '/usr/bin/frr stop %s'"
 
 # for debugging purposes, you can specify a "wrap" command to start instead
 # of starting the daemon directly, e.g. to use valgrind on ospfd:
diff -Naupr frr-frr-7.3_orig/tools/frrcommon.sh.in frr-frr-7.3/tools/frrcommon.sh.in
--- frr-frr-7.3_orig/tools/frrcommon.sh.in	2020-02-14 21:03:09.000000000 +0700
+++ frr-frr-7.3/tools/frrcommon.sh.in	2020-02-26 09:05:46.084754077 +0700
@@ -271,7 +271,7 @@ load_old_config() {
 	[ -s "$oldcfg" ] || return 0
 	grep -v '^[[:blank:]]*\(#\|$\)' "$oldcfg" > /dev/null || return 0
 
-	log_warning_msg "Reading deprecated $oldcfg.  Please move its settings to $C_PATH/daemons and remove it."
+	log_warning_msg "Reading deprecated $oldcfg.  Please move its settings to $C_PATH/daemons.conf and remove it."
 
 	# save off settings from daemons for the OR below
 	for dmn in $DAEMONS; do eval "_new_$dmn=\${$dmn:-no}"; done
@@ -282,8 +282,8 @@ load_old_config() {
 	for dmn in $DAEMONS; do eval "test \$_new_$dmn != no && $dmn=\$_new_$dmn; unset _new_$dmn"; done
 }
 
-[ -r "$C_PATH/daemons" ] || {
-	log_failure_msg "cannot run $@: $C_PATH/daemons does not exist"
+[ -r "$C_PATH/daemons.conf" ] || {
+	log_failure_msg "cannot run $@: $C_PATH/daemons.conf does not exist"
 	exit 1
 }
 . "$C_PATH/daemons"
diff -Naupr frr-frr-7.3_orig/tools/frr.in frr-frr-7.3/tools/frr.in
--- frr-frr-7.3_orig/tools/frr.in	2020-02-14 21:03:09.000000000 +0700
+++ frr-frr-7.3/tools/frr.in	2020-02-26 09:05:46.084754077 +0700
@@ -27,7 +27,7 @@ FRR_DEFAULT_PROFILE="@DFLT_NAME@" # trad
 # See /usr/share/doc/frr/README.Debian.gz for further information.
 # Keep zebra first and do not list watchfrr!
 DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd staticd bfdd fabricd vrrpd"
-MAX_INSTANCES=5
+MAX_INSTANCES=1024
 RELOAD_SCRIPT="$D_PATH/frr-reload.py"
 
 if [ -e /lib/lsb/init-functions ]; then
@@ -501,10 +501,9 @@ check_status()
 #########################################################
 
 # Config broken but script must exit silently.
-[ ! -r "$C_PATH/daemons" ] && exit 0
+[ ! -r "$C_PATH/daemons.conf" ] && exit 0
 
 # Load configuration
-. "$C_PATH/daemons"
 if [ -e "$C_PATH/daemons.conf" ]; then
 	. "$C_PATH/daemons.conf"
 fi
@@ -524,7 +523,7 @@ if test -z "$frr_profile"; then
 fi
 test -n "$frr_profile" && frr_global_options="$frr_global_options -F $frr_profile"
 
-MAX_INSTANCES=${MAX_INSTANCES:=5}
+MAX_INSTANCES=${MAX_INSTANCES:=1024}
 
 # Set priority of un-startable daemons to 'no' and substitute 'yes' to '0'
 convert_daemon_prios
diff -Naupr frr-frr-7.3_orig/tools/frr-reload frr-frr-7.3/tools/frr-reload
--- frr-frr-7.3_orig/tools/frr-reload	2020-02-14 21:03:09.000000000 +0700
+++ frr-frr-7.3/tools/frr-reload	2020-02-26 09:05:46.084754077 +0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
-if test -e /usr/lib/frr/frr-reload.py; then
-   exec /usr/lib/frr/frr-reload.py --reload /etc/frr/frr.conf
+if test -e /usr/bin/frr-reload.py; then
+   exec /usr/bin/frr-reload.py --reload /etc/frr/frr.conf
 fi
 >&2 echo "Please install frr-pythontools package. Required for reload"
 exit 1