Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Oct 2011 16:14:07 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        "Alexander V. Chernikov" <melifaro@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, "Andrey V. Elsukov" <ae@FreeBSD.org>, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r225586 - in head/sys: modules/netgraph/ipfw netgraph
Message-ID:  <20111009121407.GA94905@FreeBSD.org>
In-Reply-To: <4E918B48.5080408@FreeBSD.org>
References:  <201109151228.p8FCSHVY073618@svn.freebsd.org> <20111009063420.GZ94905@FreeBSD.org> <4E918B48.5080408@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 09, 2011 at 03:53:44PM +0400, Alexander V. Chernikov wrote:
A> Understood. So can we use more descriptive ENOENT in code below?
A> 
A>         tag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL);
A>         if (tag == NULL) {
A>                 NG_FREE_M(m);
A>                 return (EINVAL);        /* XXX: find smth better */
A>         };

Let you decide that. However, you can first analyze other places in kernel,
where m_tag_locate() really should succeed but fails. After that you probably
would want to have the same error return value in all these places :)

A> Please see an attached patch

Patch is ok from my view.

-- 
Totus tuus, Glebius.



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