Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2000 14:04:24 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        Ruslan Ermilov <ru@FreeBSD.ORG>
Cc:        luigi@FreeBSD.ORG, ipfw@FreeBSD.ORG
Subject:   Re: CFR: patch for bin/18351: ipfw add with no rule number returns the wrong rule number
Message-ID:  <200010112104.e9BL4Oe54091@bubba.whistle.com>
In-Reply-To: <20001011180742.A85291@sunbay.com> "from Ruslan Ermilov at Oct 11, 2000 06:07:42 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov writes:
> > Responsible-Changed-From-To: luigi->ru
> > Responsible-Changed-By: ru
> > Responsible-Changed-When: Wed Oct 11 07:40:11 PDT 2000
> > Responsible-Changed-Why: 
> > I have a working patch.
> > 
> This patch simply changes the IP_FW_ADD sockopt from SOPT_SET to SOPT_GET,
> thus allowing IPFW to return the assigned rule number back to userland in
> case it was not specified explicitly.  Does this patch look OK to you?

Ugh.. 'get' is not exactly intuitive.. though I agree knowing
the rule number is nice...

I think instead of overloading 'get' (and breaking all user-land
programs that do 'set') a better approach would be to add a new
sockopt IP_FW_RULENUM that would retrieve the previously used
'automatic' rule number. This would be backward compatible and
also more intuitive.

> Do I need to bump the __FreeBSD_version or not?

In any case, YES.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ipfw" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010112104.e9BL4Oe54091>