On Tue, 2009-08-25 at 13:28 +0200, Jan Safranek wrote:
> Hi,
> 
> thanks for polite warning that we have 5.5 freeze, I was not aware about it.
> But I still want to fix some bugs, so let's try the official way :). According
> to the freeze policy I send here small patch, which fixes endless loop in
> Linux implementation of ipDefaultRouterTable in current trunk (5.5-pre1).
> I think the bug is pretty serious and I'd like to have the patch in official
> net-snmp-5.5.
> 
> Linux reads the routing table from kernel via netlink socket and processes
> its entries in a loop. If the machine is configured with two same default
> routes, CONTAINER_INSERT in defaultrouter_linux.c:299 may fail. The loop then
> does not advance to next route, but continues with the already processed route
> instead and CONTAINER_INSERT fails again and the same route is processed again
> and again.
> 
> This patch advances to the next route from netlink if CONTAINER_INSERT
> fails.

+1   since this is linux specific code, the change looks safe, the
        problem is severe if hit and we already need to do another rc.

I would like to ask why you choose to retain the

var = something;
while (var) {
    ...
    if (error)
        goto label;
    ...
label:
    ++var;
}

style instead of going for

for (var = something; var; ++var) {
    ...
    if (error)
        continue;
    ...
}

as the latter style feels more obvious.

Obviously small changes have their own value, especially at a time like
this.

/MF


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to