View | Details | Raw Unified | Return to bug 159330
Collapse All | Expand All

(-)net/bird/Makefile (-2 / +3 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	bird
8
PORTNAME=	bird
9
PORTVERSION=	1.3.1
9
PORTVERSION=	1.3.2
10
PORTREVISION=	1
11
CATEGORIES=	net
10
CATEGORIES=	net
12
MASTER_SITES=	ftp://bird.network.cz/pub/bird/
11
MASTER_SITES=	ftp://bird.network.cz/pub/bird/
13
12
Lines 46-51 Link Here
46
	@${ECHO_MSG}
45
	@${ECHO_MSG}
47
	@${ECHO_MSG} "        WARNING: Please take a look on kern/134931"
46
	@${ECHO_MSG} "        WARNING: Please take a look on kern/134931"
48
	@${ECHO_MSG} "        WARNING: before using multiple fibs in production!"
47
	@${ECHO_MSG} "        WARNING: before using multiple fibs in production!"
48
	@${ECHO_MSG} "        8.2-STABLE kernel patch available here:"
49
	@${ECHO_MSG} "        http://static.ipfw.ru/patches/rtsock_82S-20110725.diff"
49
	@${ECHO_MSG}
50
	@${ECHO_MSG}
50
	@${ECHO_MSG} =====================================================================
51
	@${ECHO_MSG} =====================================================================
51
	@${ECHO_MSG}
52
	@${ECHO_MSG}
(-)net/bird/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (bird-1.3.1.tar.gz) = 848be209aba6a1a85ae0ed6192710f8bcc2f1257068191fe2959398cdec01afb
1
SHA256 (bird-1.3.2.tar.gz) = dbf8794ef3560382f10b8926e2d158da9d34670703090bfe378c08892743f54b
2
SIZE (bird-1.3.1.tar.gz) = 826422
2
SIZE (bird-1.3.2.tar.gz) = 744121
(-)net/bird/files/extra-config_includes.diff (-24 / +42 lines)
Lines 1-8 Link Here
1
Index: conf/conf.c
1
Index: conf/conf.c
2
===================================================================
2
===================================================================
3
--- conf/conf.c	(revision 4873)
3
--- conf/conf.c	(revision 4962)
4
+++ conf/conf.c	(revision 4875)
4
+++ conf/conf.c	(working copy)
5
@@ -108,7 +108,7 @@
5
@@ -108,7 +108,7 @@ config_parse(struct config *c)
6
   cfg_mem = c->mem;
6
   cfg_mem = c->mem;
7
   if (setjmp(conf_jmpbuf))
7
   if (setjmp(conf_jmpbuf))
8
     return 0;
8
     return 0;
Lines 11-17 Link Here
11
   sysdep_preconfig(c);
11
   sysdep_preconfig(c);
12
   protos_preconfig(c);
12
   protos_preconfig(c);
13
   rt_preconfig(c);
13
   rt_preconfig(c);
14
@@ -138,7 +138,7 @@
14
@@ -138,7 +138,7 @@ cli_parse(struct config *c)
15
   cfg_mem = c->mem;
15
   cfg_mem = c->mem;
16
   if (setjmp(conf_jmpbuf))
16
   if (setjmp(conf_jmpbuf))
17
     return 0;
17
     return 0;
Lines 20-26 Link Here
20
   cf_parse();
20
   cf_parse();
21
   return 1;
21
   return 1;
22
 }
22
 }
23
@@ -356,6 +356,7 @@
23
@@ -356,6 +356,7 @@ cf_error(char *msg, ...)
24
     strcpy(buf, "<bug: error message too long>");
24
     strcpy(buf, "<bug: error message too long>");
25
   new_config->err_msg = cfg_strdup(buf);
25
   new_config->err_msg = cfg_strdup(buf);
26
   new_config->err_lino = conf_lino;
26
   new_config->err_lino = conf_lino;
Lines 30-37 Link Here
30
 
30
 
31
Index: conf/cf-lex.l
31
Index: conf/cf-lex.l
32
===================================================================
32
===================================================================
33
--- conf/cf-lex.l	(revision 4873)
33
--- conf/cf-lex.l	(revision 4962)
34
+++ conf/cf-lex.l	(revision 4875)
34
+++ conf/cf-lex.l	(working copy)
35
@@ -30,6 +30,9 @@
35
@@ -30,6 +30,9 @@
36
 #include <errno.h>
36
 #include <errno.h>
37
 #include <stdlib.h>
37
 #include <stdlib.h>
Lines 42-48 Link Here
42
 
42
 
43
 #define PARSER 1
43
 #define PARSER 1
44
 
44
 
45
@@ -64,18 +67,36 @@
45
@@ -64,18 +67,36 @@ struct sym_scope {
46
 static struct sym_scope *conf_this_scope;
46
 static struct sym_scope *conf_this_scope;
47
 
47
 
48
 int conf_lino;
48
 int conf_lino;
Lines 82-88 Link Here
82
 %}
82
 %}
83
 
83
 
84
 %option noyywrap
84
 %option noyywrap
85
@@ -90,9 +111,12 @@
85
@@ -90,9 +111,12 @@ DIGIT [0-9]
86
 XIGIT [0-9a-fA-F]
86
 XIGIT [0-9a-fA-F]
87
 ALNUM [a-zA-Z_0-9]
87
 ALNUM [a-zA-Z_0-9]
88
 WHITE [ \t]
88
 WHITE [ \t]
Lines 95-101 Link Here
95
 {DIGIT}+\.{DIGIT}+\.{DIGIT}+\.{DIGIT}+ {
95
 {DIGIT}+\.{DIGIT}+\.{DIGIT}+\.{DIGIT}+ {
96
 #ifdef IPV6
96
 #ifdef IPV6
97
   if (ipv4_pton_u32(yytext, &cf_lval.i32))
97
   if (ipv4_pton_u32(yytext, &cf_lval.i32))
98
@@ -184,7 +208,7 @@
98
@@ -188,7 +212,7 @@ else: {
99
 
99
 
100
 ["][^"\n]*\n	cf_error("Unterminated string");
100
 ["][^"\n]*\n	cf_error("Unterminated string");
101
 
101
 
Lines 104-110 Link Here
104
 
104
 
105
 {WHITE}+
105
 {WHITE}+
106
 
106
 
107
@@ -220,7 +244,67 @@
107
@@ -224,7 +248,67 @@ else: {
108
 
108
 
109
 %%
109
 %%
110
 
110
 
Lines 172-178 Link Here
172
 cf_hash(byte *c)
172
 cf_hash(byte *c)
173
 {
173
 {
174
   unsigned int h = 13;
174
   unsigned int h = 13;
175
@@ -363,11 +447,28 @@
175
@@ -367,11 +451,28 @@ cf_lex_init_kh(void)
176
  * parsing of a new input.
176
  * parsing of a new input.
177
  */
177
  */
178
 void
178
 void
Lines 204-212 Link Here
204
     BEGIN(CLI);
204
     BEGIN(CLI);
205
Index: conf/conf.h
205
Index: conf/conf.h
206
===================================================================
206
===================================================================
207
--- conf/conf.h	(revision 4873)
207
--- conf/conf.h	(revision 4962)
208
+++ conf/conf.h	(revision 4875)
208
+++ conf/conf.h	(working copy)
209
@@ -38,7 +38,9 @@
209
@@ -38,7 +38,9 @@ struct config {
210
   int cli_debug;			/* Tracing of CLI connections and commands */
210
   int cli_debug;			/* Tracing of CLI connections and commands */
211
   char *err_msg;			/* Parser error message */
211
   char *err_msg;			/* Parser error message */
212
   int err_lino;				/* Line containing error */
212
   int err_lino;				/* Line containing error */
Lines 216-222 Link Here
216
   struct symbol **sym_hash;		/* Lexer: symbol hash table */
216
   struct symbol **sym_hash;		/* Lexer: symbol hash table */
217
   struct symbol **sym_fallback;		/* Lexer: fallback symbol hash table */
217
   struct symbol **sym_fallback;		/* Lexer: fallback symbol hash table */
218
   int obstacle_count;			/* Number of items blocking freeing of this config */
218
   int obstacle_count;			/* Number of items blocking freeing of this config */
219
@@ -83,7 +85,7 @@
219
@@ -83,7 +85,7 @@ char *cfg_strdup(char *c);
220
 
220
 
221
 /* Lexer */
221
 /* Lexer */
222
 
222
 
Lines 225-231 Link Here
225
 
225
 
226
 struct symbol {
226
 struct symbol {
227
   struct symbol *next;
227
   struct symbol *next;
228
@@ -107,9 +109,10 @@
228
@@ -107,9 +109,10 @@ struct symbol {
229
 #define SYM_VARIABLE 0x100	/* 0x100-0x1ff are variable types */
229
 #define SYM_VARIABLE 0x100	/* 0x100-0x1ff are variable types */
230
 
230
 
231
 extern int conf_lino;
231
 extern int conf_lino;
Lines 239-246 Link Here
239
 struct symbol *cf_define_symbol(struct symbol *symbol, int type, void *def);
239
 struct symbol *cf_define_symbol(struct symbol *symbol, int type, void *def);
240
Index: doc/bird.conf.example
240
Index: doc/bird.conf.example
241
===================================================================
241
===================================================================
242
--- doc/bird.conf.example	(revision 4873)
242
--- doc/bird.conf.example	(revision 4962)
243
+++ doc/bird.conf.example	(revision 4875)
243
+++ doc/bird.conf.example	(working copy)
244
@@ -22,6 +22,9 @@
244
@@ -22,6 +22,9 @@
245
 #	else reject;
245
 #	else reject;
246
 #}
246
 #}
Lines 253-261 Link Here
253
 
253
 
254
Index: sysdep/unix/main.c
254
Index: sysdep/unix/main.c
255
===================================================================
255
===================================================================
256
--- sysdep/unix/main.c	(revision 4873)
256
--- sysdep/unix/main.c	(revision 4962)
257
+++ sysdep/unix/main.c	(revision 4875)
257
+++ sysdep/unix/main.c	(working copy)
258
@@ -122,13 +122,12 @@
258
@@ -149,13 +149,12 @@ read_iproute_table(char *file, char *prefix, int m
259
 #endif // PATH_IPROUTE_DIR
259
 #endif // PATH_IPROUTE_DIR
260
 
260
 
261
 
261
 
Lines 271-277 Link Here
271
   if (l < 0)
271
   if (l < 0)
272
     cf_error("Read error");
272
     cf_error("Read error");
273
   return l;
273
   return l;
274
@@ -158,15 +157,15 @@
274
@@ -185,15 +184,15 @@ static int
275
 unix_read_config(struct config **cp, char *name)
275
 unix_read_config(struct config **cp, char *name)
276
 {
276
 {
277
   struct config *conf = config_alloc(name);
277
   struct config *conf = config_alloc(name);
Lines 291-297 Link Here
291
   return ret;
291
   return ret;
292
 }
292
 }
293
 
293
 
294
@@ -178,7 +177,7 @@
294
@@ -205,7 +204,7 @@ read_config(void)
295
   if (!unix_read_config(&conf, config_name))
295
   if (!unix_read_config(&conf, config_name))
296
     {
296
     {
297
       if (conf->err_msg)
297
       if (conf->err_msg)
Lines 300-302 Link Here
300
       else
300
       else
301
 	die("Unable to open configuration file %s: %m", config_name);
301
 	die("Unable to open configuration file %s: %m", config_name);
302
     }
302
     }
303
@@ -221,7 +220,7 @@ async_config(void)
304
   if (!unix_read_config(&conf, config_name))
305
     {
306
       if (conf->err_msg)
307
-	log(L_ERR "%s, line %d: %s", config_name, conf->err_lino, conf->err_msg);
308
+	log(L_ERR "%s, line %d: %s", conf->err_fname, conf->err_lino, conf->err_msg);
309
       else
310
 	log(L_ERR "Unable to open configuration file %s: %m", config_name);
311
       config_free(conf);
312
@@ -244,7 +243,7 @@ cmd_reconfig(char *name, int type)
313
   if (!unix_read_config(&conf, name))
314
     {
315
       if (conf->err_msg)
316
-	cli_msg(8002, "%s, line %d: %s", name, conf->err_lino, conf->err_msg);
317
+	cli_msg(8002, "%s, line %d: %s", conf->err_fname, conf->err_lino, conf->err_msg);
318
       else
319
 	cli_msg(8002, "%s: %m", name);
320
       config_free(conf);
(-)net/bird/files/fibs.diff (-27 / +83 lines)
Lines 1-8 Link Here
1
Index: sysdep/unix/krt.h
1
Index: sysdep/unix/krt.h
2
===================================================================
2
===================================================================
3
--- sysdep/unix/krt.h	(revision 4869)
3
--- sysdep/unix/krt.h	(revision 4963)
4
+++ sysdep/unix/krt.h	(working copy)
4
+++ sysdep/unix/krt.h	(revision 4965)
5
@@ -67,6 +67,7 @@
5
@@ -67,6 +67,7 @@ struct krt_proto {
6
 #ifdef CONFIG_ALL_TABLES_AT_ONCE
6
 #ifdef CONFIG_ALL_TABLES_AT_ONCE
7
   node instance_node;		/* Node in krt instance list */
7
   node instance_node;		/* Node in krt instance list */
8
 #endif
8
 #endif
Lines 12-20 Link Here
12
 
12
 
13
Index: sysdep/bsd/krt-sock.h
13
Index: sysdep/bsd/krt-sock.h
14
===================================================================
14
===================================================================
15
--- sysdep/bsd/krt-sock.h	(revision 4869)
15
--- sysdep/bsd/krt-sock.h	(revision 4963)
16
+++ sysdep/bsd/krt-sock.h	(working copy)
16
+++ sysdep/bsd/krt-sock.h	(revision 4965)
17
@@ -42,5 +42,8 @@
17
@@ -42,5 +42,8 @@ struct krt_if_status {
18
 
18
 
19
 static inline int krt_set_params_same(struct krt_set_params *o UNUSED, struct krt_set_params *n UNUSED) { return 1; }
19
 static inline int krt_set_params_same(struct krt_set_params *o UNUSED, struct krt_set_params *n UNUSED) { return 1; }
20
 void krt_read_msg(struct proto *p, struct ks_msg *msg, int scan);
20
 void krt_read_msg(struct proto *p, struct ks_msg *msg, int scan);
Lines 26-32 Link Here
26
Index: sysdep/bsd/fib.Y
26
Index: sysdep/bsd/fib.Y
27
===================================================================
27
===================================================================
28
--- sysdep/bsd/fib.Y	(revision 0)
28
--- sysdep/bsd/fib.Y	(revision 0)
29
+++ sysdep/bsd/fib.Y	(revision 0)
29
+++ sysdep/bsd/fib.Y	(revision 4965)
30
@@ -0,0 +1,29 @@
30
@@ -0,0 +1,29 @@
31
+/*
31
+/*
32
+ *	BIRD -- FreeBSD rtsock configuration
32
+ *	BIRD -- FreeBSD rtsock configuration
Lines 59-75 Link Here
59
+CF_END
59
+CF_END
60
Index: sysdep/bsd/Modules
60
Index: sysdep/bsd/Modules
61
===================================================================
61
===================================================================
62
--- sysdep/bsd/Modules	(revision 4869)
62
--- sysdep/bsd/Modules	(revision 4963)
63
+++ sysdep/bsd/Modules	(working copy)
63
+++ sysdep/bsd/Modules	(revision 4965)
64
@@ -4,3 +4,4 @@
64
@@ -4,3 +4,4 @@ sysio.h
65
 krt-set.h
65
 krt-set.h
66
 krt-sock.c
66
 krt-sock.c
67
 krt-sock.h
67
 krt-sock.h
68
+fib.Y
68
+fib.Y
69
Index: sysdep/bsd/krt-scan.h
69
Index: sysdep/bsd/krt-scan.h
70
===================================================================
70
===================================================================
71
--- sysdep/bsd/krt-scan.h	(revision 4869)
71
--- sysdep/bsd/krt-scan.h	(revision 4963)
72
+++ sysdep/bsd/krt-scan.h	(working copy)
72
+++ sysdep/bsd/krt-scan.h	(revision 4965)
73
@@ -10,6 +10,7 @@
73
@@ -10,6 +10,7 @@
74
 #define _BIRD_KRT_SCAN_H_
74
 #define _BIRD_KRT_SCAN_H_
75
 
75
 
Lines 80-87 Link Here
80
 struct krt_scan_status {
80
 struct krt_scan_status {
81
Index: sysdep/bsd/krt-sock.c
81
Index: sysdep/bsd/krt-sock.c
82
===================================================================
82
===================================================================
83
--- sysdep/bsd/krt-sock.c	(revision 4869)
83
--- sysdep/bsd/krt-sock.c	(revision 4963)
84
+++ sysdep/bsd/krt-sock.c	(working copy)
84
+++ sysdep/bsd/krt-sock.c	(revision 4965)
85
@@ -33,8 +33,6 @@
85
@@ -33,8 +33,6 @@
86
 #include "lib/string.h"
86
 #include "lib/string.h"
87
 #include "lib/socket.h"
87
 #include "lib/socket.h"
Lines 91-97 Link Here
91
 int
91
 int
92
 krt_capable(rte *e)
92
 krt_capable(rte *e)
93
 {
93
 {
94
@@ -53,6 +51,49 @@
94
@@ -53,6 +51,49 @@ krt_capable(rte *e)
95
      );
95
      );
96
 }
96
 }
97
 
97
 
Lines 106-112 Link Here
106
+    return 1;
106
+    return 1;
107
+  }
107
+  }
108
+
108
+
109
+  //log(L_TRACE "Max fibs: %d", fibs);
109
+  log(L_TRACE "Max fibs: %d", fibs);
110
+  return fibs;
110
+  return fibs;
111
+}
111
+}
112
+
112
+
Lines 141-147 Link Here
141
 #define ROUNDUP(a) \
141
 #define ROUNDUP(a) \
142
         ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
142
         ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
143
 
143
 
144
@@ -69,7 +110,7 @@
144
@@ -69,7 +110,7 @@ krt_capable(rte *e)
145
     body += l;}
145
     body += l;}
146
 
146
 
147
 static void
147
 static void
Lines 150-156 Link Here
150
 {
150
 {
151
   net *net = e->net;
151
   net *net = e->net;
152
   rta *a = e->attrs;
152
   rta *a = e->attrs;
153
@@ -180,23 +221,23 @@
153
@@ -180,23 +221,23 @@ static void
154
   l = body - (char *)&msg;
154
   l = body - (char *)&msg;
155
   msg.rtm.rtm_msglen = l;
155
   msg.rtm.rtm_msglen = l;
156
 
156
 
Lines 178-184 Link Here
178
     }
178
     }
179
 }
179
 }
180
 
180
 
181
@@ -218,25 +259,34 @@
181
@@ -218,25 +259,34 @@ void
182
 krt_set_start(struct krt_proto *x, int first UNUSED)
182
 krt_set_start(struct krt_proto *x, int first UNUSED)
183
 {
183
 {
184
   sock *sk_rt;
184
   sock *sk_rt;
Lines 221-227 Link Here
221
 }
221
 }
222
 
222
 
223
 #define SKIP(ARG...) do { DBG("KRT: Ignoring route - " ARG); return; } while(0)
223
 #define SKIP(ARG...) do { DBG("KRT: Ignoring route - " ARG); return; } while(0)
224
@@ -624,6 +674,8 @@
224
@@ -624,6 +674,8 @@ krt_sysctl_scan(struct proto *p, pool *pool, byte
225
   size_t obl, needed;
225
   size_t obl, needed;
226
   struct ks_msg *m;
226
   struct ks_msg *m;
227
   int retries = 3;
227
   int retries = 3;
Lines 230-236 Link Here
230
 
230
 
231
   mib[0] = CTL_NET;
231
   mib[0] = CTL_NET;
232
   mib[1] = PF_ROUTE;
232
   mib[1] = PF_ROUTE;
233
@@ -632,6 +684,17 @@
233
@@ -632,6 +684,17 @@ krt_sysctl_scan(struct proto *p, pool *pool, byte
234
   mib[4] = cmd;
234
   mib[4] = cmd;
235
   mib[5] = 0;
235
   mib[5] = 0;
236
 
236
 
Lines 248-254 Link Here
248
  try:
248
  try:
249
   if (sysctl(mib, 6 , NULL , &needed, NULL, 0) < 0)
249
   if (sysctl(mib, 6 , NULL , &needed, NULL, 0) < 0)
250
     die("krt_sysctl_scan 1: %m");
250
     die("krt_sysctl_scan 1: %m");
251
@@ -656,6 +719,7 @@
251
@@ -656,6 +719,7 @@ krt_sysctl_scan(struct proto *p, pool *pool, byte
252
 	goto try;
252
 	goto try;
253
 
253
 
254
       log(L_ERR "KRT: Route scan failed");
254
       log(L_ERR "KRT: Route scan failed");
Lines 256-262 Link Here
256
       return;
256
       return;
257
     }
257
     }
258
     die("krt_sysctl_scan 2: %m");
258
     die("krt_sysctl_scan 2: %m");
259
@@ -666,6 +730,8 @@
259
@@ -666,6 +730,8 @@ krt_sysctl_scan(struct proto *p, pool *pool, byte
260
     m = (struct ks_msg *)next;
260
     m = (struct ks_msg *)next;
261
     krt_read_msg(p, m, 1);
261
     krt_read_msg(p, m, 1);
262
   }
262
   }
Lines 265-274 Link Here
265
 }
265
 }
266
 
266
 
267
 static byte *krt_buffer = NULL;
267
 static byte *krt_buffer = NULL;
268
@@ -695,10 +761,13 @@ krt_set_construct(struct krt_config *c UNUSED)
269
 }
270
 
271
 void
272
-krt_set_shutdown(struct krt_proto *x UNUSED, int last UNUSED)
273
+krt_set_shutdown(struct krt_proto *x UNUSED, int last)
274
 {
275
-  mb_free(krt_buffer);
276
-  krt_buffer = NULL;
277
+  if (last)
278
+  {
279
+    mb_free(krt_buffer);
280
+    krt_buffer = NULL;
281
+  }
282
 }
283
 
284
 void
268
Index: sysdep/cf/bsd-v6.h
285
Index: sysdep/cf/bsd-v6.h
269
===================================================================
286
===================================================================
270
--- sysdep/cf/bsd-v6.h	(revision 4869)
287
--- sysdep/cf/bsd-v6.h	(revision 4963)
271
+++ sysdep/cf/bsd-v6.h	(working copy)
288
+++ sysdep/cf/bsd-v6.h	(revision 4965)
272
@@ -10,7 +10,7 @@
289
@@ -10,7 +10,7 @@
273
 
290
 
274
 #define CONFIG_AUTO_ROUTES
291
 #define CONFIG_AUTO_ROUTES
Lines 280-287 Link Here
280
 #undef CONFIG_UNIX_SET
297
 #undef CONFIG_UNIX_SET
281
Index: sysdep/cf/bsd.h
298
Index: sysdep/cf/bsd.h
282
===================================================================
299
===================================================================
283
--- sysdep/cf/bsd.h	(revision 4869)
300
--- sysdep/cf/bsd.h	(revision 4963)
284
+++ sysdep/cf/bsd.h	(working copy)
301
+++ sysdep/cf/bsd.h	(revision 4965)
285
@@ -8,7 +8,7 @@
302
@@ -8,7 +8,7 @@
286
 
303
 
287
 #define CONFIG_AUTO_ROUTES
304
 #define CONFIG_AUTO_ROUTES
Lines 291-293 Link Here
291
 
308
 
292
 #undef CONFIG_UNIX_IFACE
309
 #undef CONFIG_UNIX_IFACE
293
 #undef CONFIG_UNIX_SET
310
 #undef CONFIG_UNIX_SET
311
Index: sysdep/unix/krt.c
312
===================================================================
313
--- sysdep/unix/krt.c	(revision 4966)
314
+++ sysdep/unix/krt.c	(revision 4967)
315
@@ -492,9 +492,9 @@
316
 
317
 #ifdef CONFIG_ALL_TABLES_AT_ONCE
318
 static timer *krt_scan_timer;
319
-static int krt_instance_count;
320
 static list krt_instance_list;
321
 #endif
322
+static int krt_instance_count;
323
 
324
 static void
325
 krt_flush_routes(struct krt_proto *p)
326
@@ -830,6 +830,7 @@
327
   add_tail(&krt_instance_list, &p->instance_node);
328
 #else
329
   p->krt_pool = P->pool;
330
+  krt_instance_count++;
331
 #endif
332
 
333
 #ifdef KRT_ALLOW_LEARN
334
@@ -859,11 +860,12 @@
335
   struct krt_proto *p = (struct krt_proto *) P;
336
   int last = 1;
337
 
338
+  if (--krt_instance_count)
339
+    last = 0;
340
+
341
 #ifdef CONFIG_ALL_TABLES_AT_ONCE
342
   rem_node(&p->instance_node);
343
-  if (--krt_instance_count)
344
-    last = 0;
345
-  else
346
+  if (!krt_instance_count)
347
 #endif
348
     tm_stop(p->scan_timer);
349
 
(-)net/bird/files/patch-bgp-packet.c (-11 lines)
Lines 1-11 Link Here
1
--- proto/bgp/packets.c
2
+++ proto/bgp/packets.c
3
@@ -862,7 +862,7 @@ bgp_do_rx_update(struct bgp_conn *conn,
4
   if (conn->state != BS_ESTABLISHED)	/* fatal error during decoding */
5
     return;
6
 
7
-  if (a0 && bgp_set_next_hop(p, a0))
8
+  if (a0 && nlri_len && bgp_set_next_hop(p, a0))
9
     a = rta_lookup(a0);
10
 
11
   while (nlri_len)

Return to bug 159330