<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Do not rename p2p network interfaces"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=71293">71293</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Do not rename p2p network interfaces
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dh.herrmann@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi

Wifi-P2P creates temporary devices for every P2P connection that is
established. The kernel rule seems to be:
  if: wlan0
  p2p: p2p-wlan0-$num
So interface names are prefixed with "p2p" and suffixed with a unique number
(starting at 0 and counting). Note that afaics $num is never decreased for a
given interface (except on overflow) so the name is really unique for a single
interface. Once the interface gets hotplugged, it starts at 0 again.

Note that p2p interfaces are siblings of the parent interface, not children.
Like this:
lrwxrwxrwx 1 root root 0 Nov  6 10:31 p2p-wlan0-0 ->
../../devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/net/p2p-wlan0-0
lrwxrwxrwx 1 root root 0 Nov  6 10:31 wlan0 ->
../../devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/net/wlan0

This causes udev to try to rename the device to the same name as the real
interface. udev shouldn't do that. In fact, if the real interface was already
renamed, the p2p interface will pick up the name.

My proposed solution is to never rename devices that start with "p2p-".
Comments?
I have no idea how to match interface-names in udev, so couldn't provide a
patch, yet.

David</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>