kern/81349: [PATCH] Wrong error code is returned in ng_eiface(4)

Wojciech A. Koszek dunstan at freebsd.czest.pl
Sat May 21 23:50:03 GMT 2005


>Number:         81349
>Category:       kern
>Synopsis:       [PATCH] Wrong error code is returned in ng_eiface(4)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 21 23:50:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Wojciech A. Koszek
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD dunstan.freebsd.czest.pl 5.4-STABLE FreeBSD 5.4-STABLE #5: Sun May 8 11:57:11 CEST 2005 dunstan at dunstan.freebsd.czest.pl:/usr/obj/usr/src/sys/HOME8 i386


>Description:
Other Netgraph nodes return EINVAL when we try to create hook with name
which is not handled (of course, for modules which functionality rely on
hooks' names). Currently, ng_eiface(4) returns EPFNOSUPPORT, which is less
obvious while being configurated than proper -- EINVAL.

>How-To-Repeat:
# ngctl
[..]
+ mkpeer . eiface input xXxX
ngctl: send msg: Protocol family not supported

('xXxX' instead of 'ether', which is required for ng_eiface(4)).

>Fix:
Patch [diff.0.ng_eiface.c] replaces EPFNOSUPPORT with EINVAL.

--- diff.0.ng_eiface.c begins here ---
Index: src/sys/netgraph/ng_eiface.c
===================================================================
RCS file: /home/ncvs/src/sys/netgraph/ng_eiface.c,v
retrieving revision 1.31
diff -r1.31 ng_eiface.c
384c384
< 		return (EPFNOSUPPORT);
---
> 		return (EINVAL);
--- diff.0.ng_eiface.c ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list