Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#69271 - [iproute2] ip tuntap / ip link set master race condition
Attached to Project:
Arch Linux
Opened by Isopod (isopod) - Sunday, 10 January 2021, 14:04 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 27 September 2023, 08:13 GMT
Opened by Isopod (isopod) - Sunday, 10 January 2021, 14:04 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 27 September 2023, 08:13 GMT
|
DetailsDescription:
ip tuntap add mode tap && sleep 1 && ip link set tap2 master br0 Additional info: * package version(s) * config and/or log files etc. * link to upstream bug report, if any Steps to reproduce: |
This task depends upon
Closed by Toolybird (Toolybird)
Wednesday, 27 September 2023, 08:13 GMT
Reason for closing: No response
Wednesday, 27 September 2023, 08:13 GMT
Reason for closing: No response
---
Title: [iproute2] Race condition between "ip tuntap add" and "ip link set master"
Category: Packages: Core
---
Assuming you have a bridge called `br0`, the following command should create a tap device (called `tap1`, assuming you don't have any preexisting tap devices) attached to the bridge `br0`:
ip tuntap add mode tap && ip link set tap1 master br0
Expected output of `ip link`:
27: tap1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel master br0 state DOWN mode DEFAULT group default qlen 1000
link/ether 06:90:1c:82:5a:64 brd ff:ff:ff:ff:ff:ff
But instead I get:
27: tap1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether ee:90:cd:bc:66:76 brd ff:ff:ff:ff:ff:ff
Notice the missing `master br0`. This used to work, and definitely *should* work, but broke after an upgrade. I currently work around this problem by inserting a sleep between the two calls:
ip tuntap add mode tap && sleep 1 && ip link set tap1 master br0
This works, but it's very inelegant and fragile.
Package version:
* iproute2 5.10.0-2
Do you know if this broke with iproute2 update or any other package (like linux)?