kern/80008: Unnecessary requirement of sa_len in getnameinfo()

Xin Liu lx at knight.6test.edu.cn
Sat Apr 16 09:20:26 PDT 2005


>Number:         80008
>Category:       kern
>Synopsis:       Unnecessary requirement of sa_len in getnameinfo()
>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 Apr 16 16:20:25 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Xin Liu
>Release:        4.11-stable
>Organization:
Tsinghua Univ.
>Environment:
FreeBSD ns.6test.edu.cn 4.11-STABLE FreeBSD 4.11-STABLE #0: Sat Apr 16 23:09:23 CST 2005     lx at ns.6test.edu.cn:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
In the implementation of getnameinfo():

        if (sa->sa_len != salen)
                return EAI_FAIL;

This requirement of manually set sa->sa_len is unnecessary since POSIX does not require such a field in sockaddr, and it causes trouble for programs ported from OSs such as Linux where there is no sa_len field at all.
>How-To-Repeat:
      
>Fix:
      
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list