Date: Sat, 21 May 2005 23:58:07 GMT From: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/81349: [PATCH] Wrong error code is returned in ng_eiface(4) Message-ID: <200505212358.j4LNw7fo043521@freebsd.czest.pl> Resent-Message-ID: <200505212350.j4LNo2V1039735@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505212358.j4LNw7fo043521>
