Push virtio-net interface renaming into userspace.

By default, the virtio-net driver will name its interface 'ethX', which
causes the Android framework to consider this interface to be an
Ethernet device, even though it is being managed by rild and should
instead be considered a cellular network.

This change alters the NetworkInterfaceManager class to accept another
'alternate' name for the network interface at Open() time. It tries the
primary name first, and falls back to the secondary name. However,
VSoCRil now always sets up the IFLA_IFNAME field to the primary name,
which causes the SETLINK nl command to rename the interface at open
time, without needing to use the banned network(7) interface.

(This was previously worked around by detecting a magic MAC address on
the interface and renaming it with a change to the kernel. We are trying
to get rid of such hacks.)

Bug: 77634962
Change-Id: Ic0d66465c29856df74681f8be6df37bd0bc264cc
3 files changed
tree: 9c8b17d5e0686b58e33a089a7356badfa4acead3
  1. common/
  2. guest/
  3. host/
  4. tools/
  5. Android.bp
  6. Android.mk
  7. OWNERS