<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5651</bug_id>
          
          <creation_ts>2013-12-10 07:50:05 +0000</creation_ts>
          <short_desc>Error message for networking on some hardware boards when booting: &quot;ip: RTNETLINK answers: File exists&quot;</short_desc>
          <delta_ts>2014-01-10 03:30:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>connectivity</component>
          <version>1.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.6 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Chen Qi">Qi.Chen</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>cristian.iorga</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>ke.zou</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>39312</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-12-10 07:50:05 +0000</bug_when>
    <thetext>Image location: http://autobuilder.yoctoproject.org/pub/releases/1.6_M1.rc1/
Git rev: master/c51730aaa91066cfb51ad6ec2920fb4f9d9ea94c

If I used disk boot or mmc boot (not nfs boot) on some hardware boards (mpc8315e and beagleboard), there was an error message for networking when boot the system:

########################
Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
udhcpc (v1.21.1) started
Sending discover...
libphy: mdio@e0024520:00 - Link is Up - 100/Full
Sending discover...
Sending select for 128.224.178.252...
Lease of 128.224.178.252 obtained, lease time 600
ip: RTNETLINK answers: File exists
#######################

Then the system would freeze for a long time.

This issue is introduced by commit: dc80eea725906f394469b867edc1a8c72be87ad8 
This patch moves networking script from rcS.d to rcX.d, but has a wrong sequence:
########################
root@mpc8315e-rdb:~# ls /etc/rc5.d/
S02dbus-1        S10networking   S20hwclock.sh    S99oprofileui-server
S05connman       S12rpcbind      S20syslog        S99rmnologin.sh
S09sshd          S15mountnfs.sh  S21avahi-daemon  S99stop-bootlogd
S09xserver-nodm  S20distcc       S22ofono         S99tcf-agent
root@mpc8315e-rdb:~# 
########################

It seems the networking should startup before the connman and sshd.

I also found some other issues for the networking when using disk boot:

1. Even if I set a static ip address in kernel boot parameter in u-boot:
###############
hdboot=setenv bootargs root=/dev/sda2 rw ip=128.224.178.141:128.224.165.20:128.224.178.1:255.255.254.0::eth0:off console=ttyS0,115200 ;tftp 1000000 vlm-boards/17652/kernel;tftp a00000 vlm-boards/17652/dtb;bootm 1000000 - a00000
################

The networking still use dhcp to get a new ip address when booting:
################
root@mpc8315e-rdb:~# ifconfig 
eth0      Link encap:Ethernet  HWaddr 04:00:00:00:00:0A  
          inet addr:128.224.178.252  Bcast:128.224.179.255  Mask:255.255.254.0
          inet6 addr: fe80::600:ff:fe00:a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:395 errors:0 dropped:0 overruns:0 frame:0
          TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:77380 (75.5 KiB)  TX bytes:12372 (12.0 KiB)
          Base address:0xa000 
###################

In /var/log/message:
###################
Jan  1 00:00:00 mpc8315e-rdb user.notice kernel: Kernel command line: root=/dev/sda2 rw ip=128.224.178.141:128.224.178.20:128.224.178.1:::eth0:off console=ttyS0,115200
...
...
Jan  1 00:00:00 mpc8315e-rdb user.info kernel: libphy: mdio@e0024520:00 - Link is Up - 100/Full
Jan  1 00:00:00 mpc8315e-rdb user.info kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jan  1 00:00:00 mpc8315e-rdb user.warn kernel: IP-Config: Guessing netmask 255.255.0.0
Jan  1 00:00:00 mpc8315e-rdb user.info kernel: IP-Config: Complete:
Jan  1 00:00:00 mpc8315e-rdb user.info kernel:      device=eth0, hwaddr=04:00:00:00:00:0a, ipaddr=128.224.178.141, mask=255.255.0.0, gw=128.224.178.1
Jan  1 00:00:00 mpc8315e-rdb user.info kernel:      host=128.224.178.141, domain=, nis-domain=(none)
Jan  1 00:00:00 mpc8315e-rdb user.info kernel:      bootserver=128.224.178.20, rootserver=128.224.178.20, rootpath=
...
...
Jun  4 15:02:08 mpc8315e-rdb daemon.info avahi-daemon[536]: Found user &apos;avahi&apos; (UID 998) and group &apos;avahi&apos; (GID 998).
Jan  1 00:00:00 mpc8315e-rdb daemon.info avahi-daemon[536]: Successfully dropped root privileges.
Jan  1 00:00:00 mpc8315e-rdb daemon.info avahi-daemon[536]: avahi-daemon 0.6.31 starting up. 
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Successfully called chroot().
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Successfully dropped remaining capabilities.
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Loading service file /services/sftp-ssh.service.
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Loading service file /services/ssh.service.
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Joining mDNS multicast group on interface eth0.IPv4 with address 128.224.178.252.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: New relevant interface eth0.IPv4 for mDNS.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: Network interface enumeration completed.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: Registering new address record for fe80::600:ff:fe00:a on eth0.*.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: Registering new address record for 128.224.178.252 on eth0.IPv4.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: Registering HINFO record with values &apos;PPC&apos;/&apos;LINUX&apos;.
##########################


2. The connman creates a tun6to4 virtual network device by default:
#########################
tun6to4   Link encap:IPv6-in-IPv4  
          inet6 addr: 2002:80e0:b2fc::1/64 Scope:Global
          inet6 addr: ::128.224.178.252/128 Scope:Compat
          UP RUNNING NOARP  MTU:1472  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:2 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:480 (480.0 B)
#########################

Can we disable it ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39465</commentid>
    <comment_count>1</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-12-18 08:18:49 +0000</bug_when>
    <thetext>Module: openembedded-core.git
Branch: master-next
Commit: d518892d38ac399c091ff509a9fd90fc00d71224
URL:    http://git.openembedded.org/?p=openembedded-core.git&amp;a=commit;h=d518892d38ac399c091ff509a9fd90fc00d71224

//Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39726</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2014-01-10 03:30:39 +0000</bug_when>
    <thetext>Verified with master/e93a345fae7c21652547bec501fcb1f3b6c6427d</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>