<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>3707</bug_id>
          
          <creation_ts>2004-02-17 16:29:24 +0300</creation_ts>
          <short_desc>не разрешается таблица default</short_desc>
          <delta_ts>2009-05-10 09:32:00 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>iproute2</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Denis Ovsienko">pilot</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>arseny</cc>
    
    <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11818</commentid>
    <comment_count>0</comment_count>
    <who name="Denis Ovsienko">pilot</who>
    <bug_when>2004-02-17 16:29:24 +0300</bug_when>
    <thetext>По умолчанию в /etc/iproute2/rt_tables все строчки закомментированы.
Функция lib/rt_names.c:rtnl_rttable_initialize() содержит следующий код:

        rtnl_rttable_init = 1;
        rtnl_rttable_tab[255] = &quot;local&quot;;
        rtnl_rttable_tab[254] = &quot;main&quot;;
        rtnl_tab_initialize(&quot;/etc/iproute2/rt_tables&quot;,
                            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

Патч в одну строку приложен.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11819</commentid>
    <comment_count>1</comment_count>
    <who name="Denis Ovsienko">pilot</who>
    <bug_when>2004-02-17 16:30:14 +0300</bug_when>
    <thetext>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] = &quot;local&quot;;
 	rtnl_rttable_tab[254] = &quot;main&quot;;
+	rtnl_rttable_tab[253] = &quot;default&quot;;
 	rtnl_tab_initialize(&quot;/etc/iproute2/rt_tables&quot;,
 			    rtnl_rttable_tab, 256);
 }
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11826</commentid>
    <comment_count>2</comment_count>
      <attachid>350</attachid>
    <who name="Denis Ovsienko">pilot</who>
    <bug_when>2004-02-17 16:48:26 +0300</bug_when>
    <thetext>Created attachment 350
таблица default по умолчанию</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13215</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2004-05-01 23:14:01 +0400</bug_when>
    <thetext>Applied patch in -alt5, thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18954</commentid>
    <comment_count>4</comment_count>
    <who name="Denis Ovsienko">pilot</who>
    <bug_when>2004-09-27 17:43:32 +0400</bug_when>
    <thetext>2004-06-07  Stephen Hemminger  &lt;shemminger@osdl.org&gt;
	* Import patches that make sense from Fedora Core 2
...
		- iproute2-2.4.7-default
		     add entry default to rttable
...
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>350</attachid>
            <date>2004-02-17 16:48:26 +0300</date>
            <delta_ts>2004-02-17 16:48:26 +0300</delta_ts>
            <desc>таблица default по умолчанию</desc>
            <filename>iproute2-2.4.7-alt-rt_names.patch</filename>
            <type>text/plain</type>
            <size>467</size>
            <attacher name="Denis Ovsienko">pilot</attacher>
            
              <data encoding="base64">ZGlmZiAtdXJOIGlwcm91dGUyLmFsdHBhdGNoZXMvbGliL3J0X25hbWVzLmMgaXByb3V0ZTIuYWx0
cGF0Y2hlcy5kZWZhdWx0dGFiL2xpYi9ydF9uYW1lcy5jCi0tLSBpcHJvdXRlMi5hbHRwYXRjaGVz
L2xpYi9ydF9uYW1lcy5jCTIwMDAtMDQtMTYgMjA6NDI6NTIgKzAzMDAKKysrIGlwcm91dGUyLmFs
dHBhdGNoZXMuZGVmYXVsdHRhYi9saWIvcnRfbmFtZXMuYwkyMDA0LTAyLTE3IDE1OjIxOjEzICsw
MjAwCkBAIC0yNzEsNiArMjcxLDcgQEAKIAlydG5sX3J0dGFibGVfaW5pdCA9IDE7CiAJcnRubF9y
dHRhYmxlX3RhYlsyNTVdID0gImxvY2FsIjsKIAlydG5sX3J0dGFibGVfdGFiWzI1NF0gPSAibWFp
biI7CisJcnRubF9ydHRhYmxlX3RhYlsyNTNdID0gImRlZmF1bHQiOwogCXJ0bmxfdGFiX2luaXRp
YWxpemUoIi9ldGMvaXByb3V0ZTIvcnRfdGFibGVzIiwKIAkJCSAgICBydG5sX3J0dGFibGVfdGFi
LCAyNTYpOwogfQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>