svn commit: r225586 - in head/sys: modules/netgraph/ipfw netgraph

Gleb Smirnoff glebius at FreeBSD.org
Sun Oct 9 12:14:10 UTC 2011


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.


More information about the svn-src-head mailing list