Bug 1907

Summary: (YOCTO 1.2)LSB 4.1: /tset/LSB.os/network/gethostbyaddr/T.gethostbyaddr 2
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Xiaofeng Yan <Xiaofeng.yan>
Component: coreAssignee: Xiaofeng Yan <Xiaofeng.yan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: liang.li2, meta.mr.watcher, meta.watcher, sgw, yi.zhao
Version: 1.2   
Target Milestone: 1.2 M3   
Hardware: All   
OS: Multiple   
Whiteboard: (P2)Development 100%
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Xiaofeng Yan 2012-01-17 01:45:02 UTC
LSB test suite(4.1) complain "Checks gethostbyaddr for h_errno value HOST_NOT_FOUND
h_errno was set to 3
"
A part of codes about this error is as follow:
......
h_errno=0;
    if((host=gethostbyaddr((struct in_addr *)&myaddr.sin_addr.s_addr,(socklen_t)sizeof(myaddr),AF_INET)) == NULL)
    {
......
Comment 1 Xiaofeng Yan 2012-01-17 01:56:35 UTC
LSB want to get value of h_errno as "1" but get "3".

Cause:
No daemon progress "avahi-daemon" when system starting up.
"gethostbyaddr" will search file "/var/run/avahi-daemon/socket" but there is no this file which is created by avahi-daemon. 

Solution:
Method 1:
Create a link to daemon progress "avahi-daemon" in /etc/rc5.d.
Problem:
All image will include this progress when starting up.

Method 2:
Start "avahi-daemon" in LSB_Setup.sh.
Problem:
This progress will exist when only running LSB_Setup.sh but this image will not meet lsb requirement.
Comment 2 Xiaofeng Yan 2012-01-17 02:07:00 UTC
Hi Saul,

Do you think which method is better above? If I select method 1, then I didn't know whether people like it really or not?