kern/80008: Unnecessary requirement of sa_len in getnameinfo()
Xin LI
delphij at FreeBSD.org
Sun Jul 3 00:24:00 GMT 2005
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
_______________________________________________
freebsd-bugs at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe at freebsd.org"
More information about the freebsd-standards
mailing list