From: Ondrej Zajicek Date: Wed, 31 Jul 2013 15:39:16 +0000 (+0200) Subject: Merge commit 'c6964c305b425b98aaf0492806a28b578d799d83' into integrated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6477b8f10cc8626edc125f3a9e7f298303a22a48;p=thirdparty%2Fbird.git Merge commit 'c6964c305b425b98aaf0492806a28b578d799d83' into integrated Conflicts: sysdep/bsd/krt-sock.c sysdep/linux/netlink.c sysdep/unix/krt.h --- 6477b8f10cc8626edc125f3a9e7f298303a22a48 diff --cc sysdep/bsd/krt-sock.c index 6aabef2b0,cad0cfc94..49c45e668 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@@ -749,16 -681,14 +749,16 @@@ static size_t kif_buflen = 4096 void krt_do_scan(struct krt_proto *p) { - krt_sysctl_scan((struct proto *)p, p->krt_pool, &krt_buffer, &krt_buflen, - krt_sysctl_scan(&p->p, p->p.pool, &krt_buffer, &krt_buflen, NET_RT_DUMP); ++<<<<<<< HEAD:sysdep/bsd/krt-sock.c ++ krt_sysctl_scan(&p->p, p->krt_pool, &krt_buffer, &krt_buflen, + NET_RT_DUMP, rt_to_af(p->addr_type)); } void kif_do_scan(struct kif_proto *p) { - struct proto *P = (struct proto *)p; if_start_update(); - krt_sysctl_scan(P, P->pool, &kif_buffer, &kif_buflen, NET_RT_IFLIST, 0); - krt_sysctl_scan(&p->p, p->p.pool, &kif_buffer, &kif_buflen, NET_RT_IFLIST); ++ krt_sysctl_scan(&p->p, p->p.pool, &kif_buffer, &kif_buflen, NET_RT_IFLIST, 0); if_end_update(); } diff --cc sysdep/linux/netlink.c index 2b434c4c4,f61e31a50..593f8c5be --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@@ -1101,15 -1083,15 +1101,13 @@@ nl_open_async(void * Interface to the UNIX krt module */ -static u8 nl_cf_table[(NL_NUM_TABLES+7) / 8]; - void - krt_sys_start(struct krt_proto *p, int first) + krt_sys_start(struct krt_proto *p) { - nl_table_map[KRT_CF->sys.table_id] = p; + nl_tablex_map(p->addr_type == RT_IPV4)[KRT_CF->sys.table_id] = p; - if (first) - { - nl_open(); - nl_open_async(); - } + + nl_open(); + nl_open_async(); } void diff --cc sysdep/unix/krt.c index 344278471,54297921c..39d4729d9 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@@ -960,21 -996,9 +997,11 @@@ static in krt_start(struct proto *P) { struct krt_proto *p = (struct krt_proto *) P; - int first = 1; - #ifdef CONFIG_ALL_TABLES_AT_ONCE - if (!krt_instance_count++) - init_list(&krt_instance_list); - else - first = 0; - p->krt_pool = krt_pool; - add_tail(&krt_instance_list, &p->instance_node); - #else - p->krt_pool = P->pool; - #endif + add_tail(&krt_proto_list, &p->krt_node); + p->addr_type = p->p.table->addr_type; + #ifdef KRT_ALLOW_LEARN krt_learn_init(p); #endif diff --cc sysdep/unix/krt.h index 98a478589,446914d2b..a458b51e7 --- a/sysdep/unix/krt.h +++ b/sysdep/unix/krt.h @@@ -56,12 -57,12 +57,13 @@@ struct krt_proto #ifdef KRT_ALLOW_LEARN struct rtable krt_table; /* Internal table of inherited routes */ #endif - pool *krt_pool; /* Pool used for common krt data */ + + #ifndef CONFIG_ALL_TABLES_AT_ONCE timer *scan_timer; - #ifdef CONFIG_ALL_TABLES_AT_ONCE - node instance_node; /* Node in krt instance list */ #endif + + node krt_node; /* Node in krt_proto_list */ + int addr_type; /* Kernel table address type */ int initialized; /* First scan has already been finished */ };