<?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>15616</bug_id>
          
          <creation_ts>2024-10-10 08:23:12 +0000</creation_ts>
          <short_desc>network.sh udev script not configuring hotplugged interfaces</short_desc>
          <delta_ts>2024-10-31 15:00:12 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>unspecified</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></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Régis Dargent">regis.dargent</reporter>
          <assigned_to name="Régis Dargent">regis.dargent</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>regis.dargent</cc>
    
    <cc>tim.orling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>99801</commentid>
    <comment_count>0</comment_count>
    <who name="Régis Dargent">regis.dargent</who>
    <bug_when>2024-10-10 08:23:12 +0000</bug_when>
    <thetext>In the case of hotplug event of a &quot;net&quot; device (eg. USB Ethernet adapter), the /etc/udev/scripts/network.sh script is called.
This script should configure the ethernet interface by calling ifup/ifdown.
(the ifup/ifdown call is done at the end of the script)

Due to missing /etc/network/options file (and its content) and/or a service (udev_network_queue.sh ?) using /dev/udev_network_queue to initialize the network interfaces, the network.sh script exits early.

I commented out the spoofing part of the script, and everything seems to work as intended. I didn&apos;t try a cold boot with the USB adapter present, though (which seemed to be addressed by the extra code in the script long ago).

I could find traces of the arrival of the problem about 14 years ago, but it still seems present in the latest yocto (I personally found it in dunfell and petalinux 2023/langdale).
The recipe responsible for the network.sh script is udev-extraconf.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99824</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2024-10-10 15:00:56 +0000</bug_when>
    <thetext>https://layers.openembedded.org/layerindex/recipe/629/

https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/udev/udev-extraconf_1.1.bb?h=master

Would you be able to send a patch? First it should be applied to master and then can be backported as needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99832</commentid>
    <comment_count>2</comment_count>
      <attachid>5074</attachid>
    <who name="Régis Dargent">regis.dargent</who>
    <bug_when>2024-10-10 15:49:07 +0000</bug_when>
    <thetext>Created attachment 5074
Allow udev script to configure hotplugged ethernet interfaces

The script was doing nothing at all.
After the modification, it does the initialization of the ethernet interfaces, but the removed parts had warnings about security issue if the action was done too early (boot time).
My opinion is that the job is done anyway somewhere else, and it does not seem so dangerous vs the intended feature is not working.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99920</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-10-17 15:13:46 +0000</bug_when>
    <thetext>Regis, Are you able to send the patch to the oe-core email list?
That&apos;s where it can be reviewed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100028</commentid>
    <comment_count>4</comment_count>
    <who name="Régis Dargent">regis.dargent</who>
    <bug_when>2024-10-25 09:35:09 +0000</bug_when>
    <thetext>https://lists.openembedded.org/g/openembedded-core/message/206032</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100069</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-10-31 15:00:12 +0000</bug_when>
    <thetext>Merged:

https://git.openembedded.org/openembedded-core/commit/?id=160f7139172ffdf510a0d7d4e85f7fbaac7fd000

Thanks Régis !</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>5074</attachid>
            <date>2024-10-10 15:49:07 +0000</date>
            <delta_ts>2024-10-10 15:49:07 +0000</delta_ts>
            <desc>Allow udev script to configure hotplugged ethernet interfaces</desc>
            <filename>0001-Remove-spoofing-management.patch</filename>
            <type>text/plain</type>
            <size>1767</size>
            <attacher name="Régis Dargent">regis.dargent</attacher>
            
              <data encoding="base64">RnJvbSBkNjE4MWE3NGUzOWVhZDFmNmY3M2NhZjJjYmUxYWExMjI1ZWUyMTNjIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpEYXRlOiBUaHUsIDEwIE9jdCAyMDI0IDE3OjM0OjUzICswMjAwClN1Ympl
Y3Q6IFtQQVRDSF0gUmVtb3ZlIHNwb29maW5nIG1hbmFnZW1lbnQKCi0tLQogLi4uL3VkZXYvdWRl
di1leHRyYWNvbmYvbmV0d29yay5zaCAgICAgICAgICAgIHwgMzIgLS0tLS0tLS0tLS0tLS0tLS0t
LQogMSBmaWxlIGNoYW5nZWQsIDMyIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL21ldGEvcmVj
aXBlcy1jb3JlL3VkZXYvdWRldi1leHRyYWNvbmYvbmV0d29yay5zaCBiL21ldGEvcmVjaXBlcy1j
b3JlL3VkZXYvdWRldi1leHRyYWNvbmYvbmV0d29yay5zaAppbmRleCAzZWU5MjcxNGFmLi5hY2Uz
ODgwOGNkIDEwMDY0NAotLS0gYS9tZXRhL3JlY2lwZXMtY29yZS91ZGV2L3VkZXYtZXh0cmFjb25m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