| Summary: | network::tools::get_routes() doesn't work with kernel-2.6.39 | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Thierry Vignaud <thierry.vignaud> |
| Component: | RPM Packages | Assignee: | Olivier Blin <mageia> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Normal | CC: | balsacq, davidwhodgins, dmorganec, mageia, marja11, oliver.bgr, s.puch |
| Version: | Cauldron | Keywords: | PATCH |
| Target Milestone: | Mageia 3 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | (Mga2) | ||
| Source RPM: | drakx-net | CVE: | |
| Status comment: | |||
| Attachments: | fix reading routes on both older and newer kernels (2.6.39+) | ||
|
Description
Thierry Vignaud
2011-05-13 20:50:05 CEST
Thierry Vignaud
2011-05-16 15:56:00 CEST
Source RPM:
draxk-net =>
drakx-net
D Morgan
2011-05-17 15:40:56 CEST
CC:
(none) =>
dmorganec (Why Mageia 2? if possible it should be fixed before Mageia 1 is out....). I can confirm this bug. It is located in Mandriva 2010.2 as well. I used the following workaround for kernel 2.6.39 as I cannot program perl:
- edit /usr/lib/libDrakX/network/tools.pm
- locate line foreach (cat_("/proc/net/route")) {
in function sub get_routes()
- replace the line with the following three lines of code:
my @content = cat_("/proc/net/route");
my @rev_content = sort {$b cmp $a} @content;
foreach (@rev_content) {
This is just a quick hack to resort the lines from /proc/net/route
This implies that net_applet will fail with kernel version before 2.6.39!CC:
(none) =>
s.puch
Colin Guthrie
2011-07-16 22:53:34 CEST
CC:
(none) =>
mageia With kernel 3.0 this is still the same. And the simple workaround (just tested it) from Stefan Puch is functional for the libdrakx-net-0.97-1.mga1 package. Therefore it's probably worth having this included in a coming libdrakx-net-0.98.mga2 which would have with kernel 3.0 minimum as dependency. CC:
(none) =>
balsacq Created attachment 676 [details]
fix reading routes on both older and newer kernels (2.6.39+)
Of course, it would be better to move bootloader::cmp_kernel_versions() to any.pm... Keywords:
(none) =>
PATCH I'd prefer to get the same code working for both 2.6.39+ and previous versions. Status:
NEW =>
ASSIGNED Then change your data structure in order to get keep all routes for each interface instead of keeping only one, then lookup the right one... seems fixed in cauldron, closing ? Please don't close for now, I'll work on a more generic fix But when :-) ? Decreasing the priority then.. Severity:
normal =>
enhancement ... :-) There's also this fix from Mandriva: http://svn.mandriva.com/viewvc/soft/drakx-net/trunk/lib/network/tools.pm?r1=253976&r2=273311 Hi, This bug was filed against cauldron, but we do not have cauldron at the moment. Please report whether this bug is still valid for Mageia 2. Thanks :) Cheers, marja Keywords:
(none) =>
NEEDINFO (In reply to comment #14) > There's also this fix from Mandriva: > http://svn.mandriva.com/viewvc/soft/drakx-net/trunk/lib/network/tools.pm?r1=253976&r2=273311 In the change log I don't see you applied this fix, so I take it this bug is still valid Keywords:
NEEDINFO =>
(none) After 1+ year, let's close it Status:
ASSIGNED =>
RESOLVED |