svn commit: r240646 - head/sys/contrib/altq/altq

Ermal Luçi eri at freebsd.org
Wed Sep 19 19:42:50 UTC 2012


On Tue, Sep 18, 2012 at 6:15 PM, Gleb Smirnoff <glebius at freebsd.org> wrote:
>   Ermal,
>
> On Tue, Sep 18, 2012 at 06:02:06PM +0200, Ermal Lu?i wrote:
> E> The issue is that this hides the problem per se.
>
> What had hidden problem per se, was the following code:
>
>                         PF_UNLOCK();
>                         error = altq_add(a2);
>                         PF_LOCK();
>
> That's what we have in stable/9.
>
> E> The ioctl and pfctl loading of ruleset is not ready for handling failures here!
>
> They do. Error from altq_add() is returned by pf_ioctl() as response
> to DIOCADDALTQ command. The code in pfctl, which does DIOCADDALTQ also
> is handling errors.

The issue is that you will fail a ruleset loading now that before
could not fail.
You need to teach pfctl that is ok if ALTQ ruleset load fails now, no?

I think the most important thing in ruleset loading is the rules than
comes ALTQ.
Since ALTQ failure is tolerable and the risk from that faling is low!
Its better to do a best effort loading of ruleset
and just report where it failed?

You just committed a 'questionable' patch for default block, just for
security, though
break that contract by making security depend on unpredictable behaviour!
Am i missing something here? Review of things before implementation?

>
> --
> Totus tuus, Glebius.

-- 
Ermal


More information about the freebsd-pf mailing list