<?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>2329</bug_id>
          
          <creation_ts>2012-04-18 15:25:04 +0000</creation_ts>
          <short_desc>Forwarding only sometimes works from qemu connman-based images</short_desc>
          <delta_ts>2012-06-14 18:10:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>Installation</product>
          <component>Installation</component>
          <version>1.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Under patch review on oe-core ML</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Scott Garman">scott.a.garman</assigned_to>
          <cc>dexuan.cui</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>scott.a.garman</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20652</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2012-04-18 15:25:04 +0000</bug_when>
    <thetext>Sometimes on a core-image-sato qemu image (which uses connman) I cannot ping/connect to any network address other than the host 192.168.7.1, thus forwarding seems to be broken sometimes. core-image-minimal does not seem to be affected, nor does core-image-sato on atom-pc.

I&apos;ve reproduced this intermittently on both a qemumips, qemux86-64 and qemux86 images, however it seems more likely to occur on the qemumips image (which incidentally I am running remotely over ssh from another machine, thus it is slower). The behaviour leads me to believe it is a timing issue. Possibly unrelated, but it does seem that connman behaves slightly differently on the emulated network interface which is set up from boot as opposed to a real ethernet adapter on atom-pc - e.g. within qemu the connman applet doesn&apos;t show the network as connected until quite a while (up to 30s) after it starts, whereas on atom-pc it immediately shows as connected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20739</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2012-04-19 23:06:37 +0000</bug_when>
    <thetext>Is this tap/tun or something else, please update</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20744</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2012-04-19 23:28:00 +0000</bug_when>
    <thetext>This would be via tun/tap yes, when running an ext3 image via runqemu. My first plan of attack was going to be to compare the outputs of &quot;route -n&quot; when working and not working; I haven&apos;t got to that yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20816</commentid>
    <comment_count>3</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2012-04-23 11:14:57 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Sometimes on a core-image-sato qemu image (which uses connman) I cannot
&gt; ping/connect to any network address other than the host 192.168.7.1, thus
&gt; forwarding seems to be broken sometimes. core-image-minimal does not seem to be
&gt; affected, nor does core-image-sato on atom-pc.
&gt; 
&gt; I&apos;ve reproduced this intermittently on both a qemumips, qemux86-64 and qemux86
&gt; images, however it seems more likely to occur on the qemumips image (which
&gt; incidentally I am running remotely over ssh from another machine, thus it is
&gt; slower). The behaviour leads me to believe it is a timing issue. Possibly
&gt; unrelated, but it does seem that connman behaves slightly differently on the
&gt; emulated network interface which is set up from boot as opposed to a real
&gt; ethernet adapter on atom-pc - e.g. within qemu the connman applet doesn&apos;t show
&gt; the network as connected until quite a while (up to 30s) after it starts,
&gt; whereas on atom-pc it immediately shows as connected.
Hi Paul,
When you see the issue, can you please run
&quot;echo 1 &gt; /proc/sys/net/ipv4/conf/tap0/proxy_arp&quot; (change tap0 to the actual one if it&apos;s not tap0) in the host with root privilege, and please use IP address directly to exclude any possible DNS issue?

I recently noticed the similar issue (I suppose it&apos;s similar) -- I can always reproduce the issue on qemux86 and I work it around by enabling the proxy_arp and cat my host&apos;s resolv.conf into the qemu guest&apos;s one.

I remember vaguely long ago I didn&apos;t have such an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20895</commentid>
    <comment_count>4</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2012-04-27 00:06:16 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #0)
&gt; &gt; Sometimes on a core-image-sato qemu image (which uses connman) I cannot
&gt; &gt; ping/connect to any network address other than the host 192.168.7.1, thus
&gt; &gt; forwarding seems to be broken sometimes. core-image-minimal does not seem to be
&gt; &gt; affected, nor does core-image-sato on atom-pc.
&gt; &gt; 
&gt; &gt; I&apos;ve reproduced this intermittently on both a qemumips, qemux86-64 and qemux86
&gt; &gt; images, however it seems more likely to occur on the qemumips image (which
&gt; &gt; incidentally I am running remotely over ssh from another machine, thus it is
&gt; &gt; slower). The behaviour leads me to believe it is a timing issue. Possibly
&gt; &gt; unrelated, but it does seem that connman behaves slightly differently on the
&gt; &gt; emulated network interface which is set up from boot as opposed to a real
&gt; &gt; ethernet adapter on atom-pc - e.g. within qemu the connman applet doesn&apos;t show
&gt; &gt; the network as connected until quite a while (up to 30s) after it starts,
&gt; &gt; whereas on atom-pc it immediately shows as connected.
&gt; Hi Paul,
&gt; When you see the issue, can you please run
&gt; &quot;echo 1 &gt; /proc/sys/net/ipv4/conf/tap0/proxy_arp&quot; (change tap0 to the actual
&gt; one if it&apos;s not tap0) in the host with root privilege, and please use IP
&gt; address directly to exclude any possible DNS issue?
&gt; 
&gt; I recently noticed the similar issue (I suppose it&apos;s similar) -- I can always
&gt; reproduce the issue on qemux86 and I work it around by enabling the proxy_arp
&gt; and cat my host&apos;s resolv.conf into the qemu guest&apos;s one.
&gt; 
&gt; I remember vaguely long ago I didn&apos;t have such an issue.


I suppose the patch in poky master has fixed this bug?
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0f95925b4cdc39a40969f7e496c3924fa91f61c6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20899</commentid>
    <comment_count>5</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2012-04-27 02:07:04 +0000</bug_when>
    <thetext>No, that patch only fixed the issue in core-image-minimal, which doesn&apos;t use conman. What I found is that external network access works for about the first 30 seconds or so after a -sato image boots up, then external network access stops working. So I suspect that there is something conman is doing to change things - though I have yet to confirm this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20901</commentid>
    <comment_count>6</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2012-04-27 02:19:41 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; No, that patch only fixed the issue in core-image-minimal, which doesn&apos;t use
&gt; conman. What I found is that external network access works for about the first
&gt; 30 seconds or so after a -sato image boots up, then external network access
&gt; stops working. So I suspect that there is something conman is doing to change
&gt; things - though I have yet to confirm this.
Though I&apos;m not familiar with iptables and the tap device, with the following patch aplied, I do make the network in qemu sato image work . :-)
BTW, however the DNS resolver in qemu sato still doesn&apos;t work as expected -- I have to use IP address directly, or scp my host&apos;s /etc/resolv.conf into the qemu target.
Maybe you can try this when you get the issue with connman in qemu sato.
Hope this can be a clue to the final fix.

diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup
index f80538f..1f1b4c8 100755
--- a/scripts/runqemu-ifup
+++ b/scripts/runqemu-ifup
@@ -103,6 +103,7 @@ $ROUTE add -host 192.168.7.$dest $TAP
 $IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$n/32
 $IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$dest/32
 echo 1 &gt; /proc/sys/net/ipv4/ip_forward
+echo 1 &gt; /proc/sys/net/ipv4/conf/$TAP/proxy_arp
 $IPTABLES -P FORWARD ACCEPT

 echo $TAP</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20902</commentid>
    <comment_count>7</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2012-04-27 02:44:37 +0000</bug_when>
    <thetext>Thanks! I&apos;ll check that out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22212</commentid>
    <comment_count>8</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2012-06-14 18:10:10 +0000</bug_when>
    <thetext>Fixed in poky denzil as of:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=denzil&amp;id=309b2c090ed25df35457225e041e5e37976dd9f8</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>