<h3>Contribution description</h3>
<p>If an EUI provider is set to match ANY interface at ANY index, it will match multiple times if there are multiple interfaces.<br>
Avoid this by introducing an array to keep track of which provider was used for which interface.</p>
<h3>Testing procedure</h3>
<p>Add <code>USEMODULE += dose</code> to <code>examples/gnrc_networking</code> when building for <code>same54-xpro</code>.</p>
<h4>before</h4>
<p>Both DOSE and Ethernet interface use the same MAC address from the at24mac chip.</p>
<div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="2021-06-02 13:54:52,130 # Iface  6  HWaddr: FC:C2:3D:0D:2D:1F 
2021-06-02 13:54:52,134 #           L2-PDU:1500  MTU:1500  HL:64  RTR  
2021-06-02 13:54:52,136 #           RTR_ADV  
2021-06-02 13:54:52,139 #           Source address length: 6
2021-06-02 13:54:52,141 #           Link type: wired
2021-06-02 13:54:52,147 #           inet6 addr: fe80::fec2:3dff:fe0d:2d1f  scope: link  VAL
2021-06-02 13:54:52,150 #           inet6 group: ff02::2
2021-06-02 13:54:52,152 #           inet6 group: ff02::1
2021-06-02 13:54:52,156 #           inet6 group: ff02::1:ff0d:2d1f
2021-06-02 13:54:52,157 #           
2021-06-02 13:54:52,160 #           Statistics for Layer 2
2021-06-02 13:54:52,163 #             RX packets 0  bytes 0
2021-06-02 13:54:52,167 #             TX packets 1 (Multicast: 1)  bytes 78
2021-06-02 13:54:52,170 #             TX succeeded 1 errors 0
2021-06-02 13:54:52,173 #           Statistics for IPv6
2021-06-02 13:54:52,176 #             RX packets 0  bytes 0
2021-06-02 13:54:52,180 #             TX packets 1 (Multicast: 1)  bytes 64
2021-06-02 13:54:52,183 #             TX succeeded 1 errors 0
2021-06-02 13:54:52,183 # 
2021-06-02 13:54:52,187 # Iface  5  HWaddr: FC:C2:3D:0D:2D:1F 
2021-06-02 13:54:52,191 #           L2-PDU:1500  MTU:1500  HL:64  RTR  
2021-06-02 13:54:52,193 #           RTR_ADV  
2021-06-02 13:54:52,196 #           Source address length: 6
2021-06-02 13:54:52,198 #           Link type: wired
2021-06-02 13:54:52,204 #           inet6 addr: fe80::fec2:3dff:fe0d:2d1f  scope: link  TNT[1]
2021-06-02 13:54:52,207 #           inet6 group: ff02::2
2021-06-02 13:54:52,210 #           inet6 group: ff02::1
2021-06-02 13:54:52,213 #           inet6 group: ff02::1:ff0d:2d1f
2021-06-02 13:54:52,214 #           
2021-06-02 13:54:52,217 #           Statistics for Layer 2
2021-06-02 13:54:52,220 #             RX packets 0  bytes 0
2021-06-02 13:54:52,224 #             TX packets 1 (Multicast: 1)  bytes 0
2021-06-02 13:54:52,227 #             TX succeeded 0 errors 1
2021-06-02 13:54:52,230 #           Statistics for IPv6
2021-06-02 13:54:52,233 #             RX packets 0  bytes 0
2021-06-02 13:54:52,237 #             TX packets 1 (Multicast: 1)  bytes 64
2021-06-02 13:54:52,241 #             TX succeeded 1 errors 0
"><pre><code>2021-06-02 13:54:52,130 # Iface  6  HWaddr: FC:C2:3D:0D:2D:1F 
2021-06-02 13:54:52,134 #           L2-PDU:1500  MTU:1500  HL:64  RTR  
2021-06-02 13:54:52,136 #           RTR_ADV  
2021-06-02 13:54:52,139 #           Source address length: 6
2021-06-02 13:54:52,141 #           Link type: wired
2021-06-02 13:54:52,147 #           inet6 addr: fe80::fec2:3dff:fe0d:2d1f  scope: link  VAL
2021-06-02 13:54:52,150 #           inet6 group: ff02::2
2021-06-02 13:54:52,152 #           inet6 group: ff02::1
2021-06-02 13:54:52,156 #           inet6 group: ff02::1:ff0d:2d1f
2021-06-02 13:54:52,157 #           
2021-06-02 13:54:52,160 #           Statistics for Layer 2
2021-06-02 13:54:52,163 #             RX packets 0  bytes 0
2021-06-02 13:54:52,167 #             TX packets 1 (Multicast: 1)  bytes 78
2021-06-02 13:54:52,170 #             TX succeeded 1 errors 0
2021-06-02 13:54:52,173 #           Statistics for IPv6
2021-06-02 13:54:52,176 #             RX packets 0  bytes 0
2021-06-02 13:54:52,180 #             TX packets 1 (Multicast: 1)  bytes 64
2021-06-02 13:54:52,183 #             TX succeeded 1 errors 0
2021-06-02 13:54:52,183 # 
2021-06-02 13:54:52,187 # Iface  5  HWaddr: FC:C2:3D:0D:2D:1F 
2021-06-02 13:54:52,191 #           L2-PDU:1500  MTU:1500  HL:64  RTR  
2021-06-02 13:54:52,193 #           RTR_ADV  
2021-06-02 13:54:52,196 #           Source address length: 6
2021-06-02 13:54:52,198 #           Link type: wired
2021-06-02 13:54:52,204 #           inet6 addr: fe80::fec2:3dff:fe0d:2d1f  scope: link  TNT[1]
2021-06-02 13:54:52,207 #           inet6 group: ff02::2
2021-06-02 13:54:52,210 #           inet6 group: ff02::1
2021-06-02 13:54:52,213 #           inet6 group: ff02::1:ff0d:2d1f
2021-06-02 13:54:52,214 #           
2021-06-02 13:54:52,217 #           Statistics for Layer 2
2021-06-02 13:54:52,220 #             RX packets 0  bytes 0
2021-06-02 13:54:52,224 #             TX packets 1 (Multicast: 1)  bytes 0
2021-06-02 13:54:52,227 #             TX succeeded 0 errors 1
2021-06-02 13:54:52,230 #           Statistics for IPv6
2021-06-02 13:54:52,233 #             RX packets 0  bytes 0
2021-06-02 13:54:52,237 #             TX packets 1 (Multicast: 1)  bytes 64
2021-06-02 13:54:52,241 #             TX succeeded 1 errors 0
</code></pre></div>
<h4>with this patch</h4>
<p>The MAC address is only used once.</p>
<div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="2021-06-02 14:03:50,929 # Iface  6  HWaddr: A6:ED:29:EC:CB:F3 
2021-06-02 14:03:50,933 #           L2-PDU:1500  MTU:1500  HL:64  RTR  
2021-06-02 14:03:50,935 #           RTR_ADV  
2021-06-02 14:03:50,938 #           Source address length: 6
2021-06-02 14:03:50,941 #           Link type: wired
2021-06-02 14:03:50,946 #           inet6 addr: fe80::a4ed:29ff:feec:cbf3  scope: link  VAL
2021-06-02 14:03:50,949 #           inet6 group: ff02::2
2021-06-02 14:03:50,952 #           inet6 group: ff02::1
2021-06-02 14:03:50,955 #           inet6 group: ff02::1:ffec:cbf3
2021-06-02 14:03:50,956 #           
2021-06-02 14:03:50,959 #           Statistics for Layer 2
2021-06-02 14:03:50,962 #             RX packets 0  bytes 0
2021-06-02 14:03:50,966 #             TX packets 1 (Multicast: 1)  bytes 78
2021-06-02 14:03:50,970 #             TX succeeded 1 errors 0
2021-06-02 14:03:50,972 #           Statistics for IPv6
2021-06-02 14:03:50,975 #             RX packets 0  bytes 0
2021-06-02 14:03:50,980 #             TX packets 1 (Multicast: 1)  bytes 64
2021-06-02 14:03:50,983 #             TX succeeded 1 errors 0
2021-06-02 14:03:50,983 # 
2021-06-02 14:03:50,986 # Iface  5  HWaddr: FC:C2:3D:0D:2D:1F 
2021-06-02 14:03:50,990 #           L2-PDU:1500  MTU:1500  HL:64  RTR  
2021-06-02 14:03:50,992 #           RTR_ADV  
2021-06-02 14:03:50,995 #           Source address length: 6
2021-06-02 14:03:50,998 #           Link type: wired
2021-06-02 14:03:51,003 #           inet6 addr: fe80::fec2:3dff:fe0d:2d1f  scope: link  VAL
2021-06-02 14:03:51,006 #           inet6 group: ff02::2
2021-06-02 14:03:51,009 #           inet6 group: ff02::1
2021-06-02 14:03:51,012 #           inet6 group: ff02::1:ff0d:2d1f
2021-06-02 14:03:51,013 #           
2021-06-02 14:03:51,016 #           Statistics for Layer 2
2021-06-02 14:03:51,019 #             RX packets 0  bytes 0
2021-06-02 14:03:51,023 #             TX packets 1 (Multicast: 1)  bytes 0
2021-06-02 14:03:51,027 #             TX succeeded 0 errors 1
2021-06-02 14:03:51,029 #           Statistics for IPv6
2021-06-02 14:03:51,032 #             RX packets 0  bytes 0
2021-06-02 14:03:51,037 #             TX packets 1 (Multicast: 1)  bytes 64
2021-06-02 14:03:51,040 #             TX succeeded 1 errors 0
"><pre><code>2021-06-02 14:03:50,929 # Iface  6  HWaddr: A6:ED:29:EC:CB:F3 
2021-06-02 14:03:50,933 #           L2-PDU:1500  MTU:1500  HL:64  RTR  
2021-06-02 14:03:50,935 #           RTR_ADV  
2021-06-02 14:03:50,938 #           Source address length: 6
2021-06-02 14:03:50,941 #           Link type: wired
2021-06-02 14:03:50,946 #           inet6 addr: fe80::a4ed:29ff:feec:cbf3  scope: link  VAL
2021-06-02 14:03:50,949 #           inet6 group: ff02::2
2021-06-02 14:03:50,952 #           inet6 group: ff02::1
2021-06-02 14:03:50,955 #           inet6 group: ff02::1:ffec:cbf3
2021-06-02 14:03:50,956 #           
2021-06-02 14:03:50,959 #           Statistics for Layer 2
2021-06-02 14:03:50,962 #             RX packets 0  bytes 0
2021-06-02 14:03:50,966 #             TX packets 1 (Multicast: 1)  bytes 78
2021-06-02 14:03:50,970 #             TX succeeded 1 errors 0
2021-06-02 14:03:50,972 #           Statistics for IPv6
2021-06-02 14:03:50,975 #             RX packets 0  bytes 0
2021-06-02 14:03:50,980 #             TX packets 1 (Multicast: 1)  bytes 64
2021-06-02 14:03:50,983 #             TX succeeded 1 errors 0
2021-06-02 14:03:50,983 # 
2021-06-02 14:03:50,986 # Iface  5  HWaddr: FC:C2:3D:0D:2D:1F 
2021-06-02 14:03:50,990 #           L2-PDU:1500  MTU:1500  HL:64  RTR  
2021-06-02 14:03:50,992 #           RTR_ADV  
2021-06-02 14:03:50,995 #           Source address length: 6
2021-06-02 14:03:50,998 #           Link type: wired
2021-06-02 14:03:51,003 #           inet6 addr: fe80::fec2:3dff:fe0d:2d1f  scope: link  VAL
2021-06-02 14:03:51,006 #           inet6 group: ff02::2
2021-06-02 14:03:51,009 #           inet6 group: ff02::1
2021-06-02 14:03:51,012 #           inet6 group: ff02::1:ff0d:2d1f
2021-06-02 14:03:51,013 #           
2021-06-02 14:03:51,016 #           Statistics for Layer 2
2021-06-02 14:03:51,019 #             RX packets 0  bytes 0
2021-06-02 14:03:51,023 #             TX packets 1 (Multicast: 1)  bytes 0
2021-06-02 14:03:51,027 #             TX succeeded 0 errors 1
2021-06-02 14:03:51,029 #           Statistics for IPv6
2021-06-02 14:03:51,032 #             RX packets 0  bytes 0
2021-06-02 14:03:51,037 #             TX packets 1 (Multicast: 1)  bytes 64
2021-06-02 14:03:51,040 #             TX succeeded 1 errors 0
</code></pre></div>
<h3>Issues/PRs references</h3>


<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/16521'>https://github.com/RIOT-OS/RIOT/pull/16521</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>net/eui_provider: only use every provider once</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16521/files#diff-8476f0d545fb25807e98d5d0a55932e9c5e8cb3d5c3d7398dedd84a75830ed14">sys/net/link_layer/eui_provider/eui_provider.c</a>
    (27)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16521.patch'>https://github.com/RIOT-OS/RIOT/pull/16521.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16521.diff'>https://github.com/RIOT-OS/RIOT/pull/16521.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16521">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYCDVCYSDXVCXR7MFPTTQYSR5ANCNFSM456VXLEQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYBKCRR6X4J3TTCNOCTTQYSR5A5CNFSM456VXLE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4NRVMXQQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16521",
"url": "https://github.com/RIOT-OS/RIOT/pull/16521",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>