{"id":2032,"date":"2011-11-01T12:29:14","date_gmt":"2011-11-01T05:29:14","guid":{"rendered":"http:\/\/www.jfdesignnet.com\/?p=2032"},"modified":"2011-11-01T12:29:14","modified_gmt":"2011-11-01T05:29:14","slug":"net_applet-route-fix","status":"publish","type":"post","link":"https:\/\/www.jfdesignnet.com\/?p=2032","title":{"rendered":"net_applet route fix"},"content":{"rendered":"<p style=\"text-align: justify;\"><a href=\"http:\/\/www.jfdesignnet.com\/wp-content\/uploads\/2011\/11\/network_offline.png\" rel=\"lightbox[2032]\"><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-full wp-image-2041\" title=\"network_offline\" src=\"http:\/\/www.jfdesignnet.com\/wp-content\/uploads\/2011\/11\/network_offline.png\" alt=\"\" width=\"128\" height=\"128\" \/><\/a>Just compiled new kernel 3.1.1 last weekend for i586 arch and\u00a0works perfectly on\u00a0my axioo notebook. All hardware working as I expected and stable enough since I already use it for 4 days without any fuss. Suspend and hibernate also perfectly running well and can wake up ethernet and my iwl-5100 without difficulties. Also, the intel graphics card on this notebook quite working more happy and snappier without any stuttering during using kwin plasma desktop effects. this is very good.<\/p>\n<p style=\"text-align: justify;\">I&#8217;m not including the complete 3rd party kernel drivers at this time and also the aufs patch so I cannot remaster for some time being until I can find some free time.\u00a0maybe next weekend or in the airport lounge because I have flight schedule next monday, along with bfs patch and pae kernel. Just recently, I miss the flight and since then I always come one hour earlier before boarding and gives me more time on airport lounge to do something else &#8230; but yeah, of course if only i brought my i7 notebook, not this axioo notebook because the battery sucks and cannot complete the compile within an hour. \ud83d\ude00<\/p>\n<p style=\"text-align: justify;\">The only problem after using this 3.1.1 kernel although not too mission critical is the net_applet not showing the network connection status accurately. The icon status on the taskbar stay inactive although I can browse the internet and reading my email. \ud83d\ude42\u00a0This problem has\u00a0also\u00a0appeared\u00a0in kernel\u00a02.6.39\u00a0if\u00a0I\u00a0remember correctly,\u00a0but it works fine on\u00a0kernel\u00a02.6.38 and below.<br \/>\nYesterday,\u00a0I have time\u00a0to\u00a0investigate\u00a0this,\u00a0and\u00a0it seems at\u00a0this\u00a03.x\u00a0series\u00a0kernel mapped the network routes that goes to \/proc\/net\/routes output in reversed.<\/p>\n<pre>[root@jfklixs-domain ~]# cat \/proc\/net\/route\nIface   Destination     Gateway         Flags   RefCnt  Use     Metric  Mask            MTU     Window  IRTT\neth0    00000000        050D0A0A        0003    0       0       0       00000000        0       0       0\neth0    000D0A0A        00000000        0001    0       0       0       00FFFFFF        0       0       0\nlo      0000007F        00000000        0001    0       0       0       000000FF        0       0       0\neth0    0000FEA9        00000000        0001    0       0       1002    0000FFFF        0       0       0\neth0    000AA8C0        00000000        0001    0       0       0       00FFFFFF        0       0       0\n[root@jfklixs-domain ~]#<\/pre>\n<p style=\"text-align: justify;\">eth0 00000000 should be listed at last, not on first, thus network::tools::get_routes() cannot read it and net_applet see the network as down whereas it&#8217;s up.<\/p>\n<p style=\"text-align: justify;\">I&#8217;m not doing perl programming so looking for patch at mageia bugzilla (thanks tv \ud83d\ude42 ) and creating my own patch :<\/p>\n<pre>--- lib\/network\/tools.pm.orig\u00a0\u00a0\u00a02011-11-01 22:13:45.588528869 +0700\n+++ lib\/network\/tools.pm\u00a0\u00a0\u00a02011-11-01 22:19:30.689503038 +0700\n@@ -263,7 +263,12 @@\n\nsub get_routes() {\nmy %routes;\n-\u00a0 \u00a0 foreach (cat_(\"\/proc\/net\/route\")) {\n+\u00a0 \u00a0 # jfdesign - fix reading routes on both older and newer kernels (2.6.39+)\n+\u00a0 \u00a0 #foreach (cat_(\"\/proc\/net\/route\")) {\n+\u00a0 \u00a0 my @routes = cat_(\"\/proc\/net\/route\");\n+\u00a0 \u00a0 require bootloader;\n+\u00a0 \u00a0 @routes = reverse(@routes) if bootloader::cmp_kernel_versions(c::kernel_version(), \"2.6.39\") &gt;= 0;\n+\u00a0 \u00a0 foreach (@routes) {\nif (\/^(S+)s+([0-9A-F]+)s+([0-9A-F]+)s+[0-9A-F]+s+d+s+d+s+(d+)s+([0-9A-F]+)\/) {\nif (defined $3) { $routes{$1}{gateway} = hex($3) ? host_hex_to_dotted($3) : $routes{$1}{network} }\nif (defined $2) { $routes{$1}{network} = host_hex_to_dotted($2) }<\/pre>\n<p>I name it as net_applet-routes-fix.diff and place it as Patch12 on spec file<br \/>\nPatch12: net_applet-routes-fix.diff<br \/>\n%patch12 -p0<\/p>\n<p style=\"text-align: justify;\">rebuild the rpm and now the net_applet show correctly for both of my kernel.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just compiled new kernel 3.1.1 last weekend for i586 arch and\u00a0works perfectly on\u00a0my axioo notebook. All hardware working as I expected and stable enough since I already use it for 4 days without any fuss. Suspend and hibernate also perfectly running well and can wake up ethernet and my iwl-5100 without difficulties. Also, the intel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2041,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,9],"tags":[165],"_links":{"self":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/posts\/2032"}],"collection":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2032"}],"version-history":[{"count":0,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/posts\/2032\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/media\/2041"}],"wp:attachment":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}