Re: Routing bugs: zebra/quagga are unusable => I have found the

看板DFBSD_bugs作者時間21年前 (2005/01/05 20:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
I have found the reason why ospfd crashes with segmentation faults. The culprit is line 261 of /usr/include/net/route.h #define sa_dst rti_info[RTAX_DST] This macro hides some local variables from ospfd and leads to attempts to read from a null address. This macro and the other similar macrodefintions do not exist in FreeBSD. I believe that they break a large number of networking programs. The origin of the problem is that in this case the old C tradition to use small letters for variables and capital letters for macrodefintions has not been observed. This example shows that there was a very good reason for that tradition. I suggest to change these macros to capital letters and in the future to define macros according to the tradition, because otherwise it is impossible to avoid name conflicts and the C compiler cannot signal the error in such cases. The panic that appears with vlan interfaces is caused by a field (ifma_lladdr) in the interface structures that remains uninitialized in DragonFly, unlike in FreeBSD, but I have yet to find where it should have been initialized. Best regards !
文章代碼(AID): #11szS600 (DFBSD_bugs)
文章代碼(AID): #11szS600 (DFBSD_bugs)