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

Wojciech A. Koszek dunstan at
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
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 21 23:50:02 GMT 2005
>Originator:     Wojciech A. Koszek
>Release:        FreeBSD 5.4-STABLE i386
System: FreeBSD 5.4-STABLE FreeBSD 5.4-STABLE #5: Sun May 8 11:57:11 CEST 2005 dunstan at i386

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.

# ngctl
+ mkpeer . eiface input xXxX
ngctl: send msg: Protocol family not supported

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

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
< 		return (EPFNOSUPPORT);
> 		return (EINVAL);
--- diff.0.ng_eiface.c ends here ---

More information about the freebsd-bugs mailing list