Previously we would try cloning /dev/tap and then setting the name of the cloned result to the provided tap ifname. Instead, just use the provided ifname if it exists.
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
hopefully I haven't confused you too much by uploading a QEMU diff to our phabricator :)
net/tap-bsd.c | ||
---|---|---|
142 | Do we even support this on a cloned tap device? I think it gets whatever name is assigned when it is created and can never be changed. I guess it's fine to let the ioctl fail, but it might be clearer to just strcmp the name with the name from TAPGIFNAME and fail if they don't match? |
Comment Actions
LGTM. As spoken on IRC with emaste, we could also strcmp ifname and if it starts with "tap" assume it's already created.
net/tap-bsd.c | ||
---|---|---|
142 | Yes, only the interface name is changed, the device name stays the same. This is important for Xen because the Xen toolstack expects a specific name for each guest/interface in order to add them to the bridge specified in the config file. |