Date: Sat, 16 Apr 2005 16:37:38 GMT From: Xin LI <delphij@FreeBSD.org> To: lx@knight.6test.edu.cn, delphij@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: kern/80008: Unnecessary requirement of sa_len in getnameinfo() Message-ID: <200504161637.j3GGbchA015884@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
Synopsis: Unnecessary requirement of sa_len in getnameinfo() State-Changed-From-To: open->analyzed State-Changed-By: delphij State-Changed-When: Sat Apr 16 16:33:02 GMT 2005 State-Changed-Why: Dear freebsd-standards, Would you please review the following patch? I have consulted with POSIX standard and there is no requirement that there must be a "sa_len" field in sockaddr. Therefore, I think the check should be either removed, or be replaced with an assignment. Index: getnameinfo.c =================================================================== RCS file: /home/ncvs/src/lib/libc/net/getnameinfo.c,v retrieving revision 1.14 diff -u -r1.14 getnameinfo.c --- getnameinfo.c 1 May 2003 19:03:14 -0000 1.14 +++ getnameinfo.c 16 Apr 2005 16:31:33 -0000 @@ -109,9 +109,6 @@ if (sa == NULL) return EAI_FAIL; - if (sa->sa_len != salen) - return EAI_FAIL; - family = sa->sa_family; for (i = 0; afdl[i].a_af; i++) if (afdl[i].a_af == family) { Responsible-Changed-From-To: freebsd-bugs->freebsd-standards Responsible-Changed-By: delphij Responsible-Changed-When: Sat Apr 16 16:33:02 GMT 2005 Responsible-Changed-Why: Patch candidate for review. http://www.freebsd.org/cgi/query-pr.cgi?pr=80008
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504161637.j3GGbchA015884>