| Summary: | не разрешается таблица default | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Sisyphus | Reporter: | Denis Ovsienko <pilot> | ||||
| Component: | iproute2 | Assignee: | placeholder <placeholder> | ||||
| Status: | CLOSED FIXED | QA Contact: | qa-sisyphus | ||||
| Severity: | minor | ||||||
| Priority: | P2 | CC: | arseny, glebfm, ldv, placeholder, vt | ||||
| Version: | unstable | ||||||
| Hardware: | all | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
diff -urN iproute2.altpatches/lib/rt_names.c
iproute2.altpatches.defaulttab/lib/rt_names.c
--- iproute2.altpatches/lib/rt_names.c 2000-04-16 20:42:52 +0300
+++ iproute2.altpatches.defaulttab/lib/rt_names.c 2004-02-17 15:21:13 +0200
@@ -271,6 +271,7 @@
rtnl_rttable_init = 1;
rtnl_rttable_tab[255] = "local";
rtnl_rttable_tab[254] = "main";
+ rtnl_rttable_tab[253] = "default";
rtnl_tab_initialize("/etc/iproute2/rt_tables",
rtnl_rttable_tab, 256);
}
Created attachment 350 [details]
таблица default по умолчанию
Applied patch in -alt5, thanks. 2004-06-07 Stephen Hemminger <shemminger@osdl.org> * Import patches that make sense from Fedora Core 2 ... - iproute2-2.4.7-default add entry default to rttable ... |
По умолчанию в /etc/iproute2/rt_tables все строчки закомментированы. Функция lib/rt_names.c:rtnl_rttable_initialize() содержит следующий код: rtnl_rttable_init = 1; rtnl_rttable_tab[255] = "local"; rtnl_rttable_tab[254] = "main"; rtnl_tab_initialize("/etc/iproute2/rt_tables", rtnl_rttable_tab, 256); Соответственно в поставке по умолчанию: # ip ru ls 0: from all lookup local 32766: from all lookup main 32767: from all lookup 253 Есть 2 решения: раскомментарить соответствие в /etc/iproute2/rt_tables или добавить 1 строку в функцию rtnl_rttable_initialize, после чего ip работает правильно: [pilot@merlin iproute2.work]$ ./ip/ip ru 0: from all lookup local 32766: from all lookup main 32767: from all lookup default Патч в одну строку приложен.