Fixes #33 by avoiding to overwrite the output of the ipvlan plugin (interfaces) and not associating IPs created by the ipvlan plugin to veth0.
In addition, ip.SetupVeth does not retrieve MAC address from peer in veth so the field is empty. There is a method to create an net.interface from a netlink.link in package github.com/containernetworking/plugins/pkg/ip (ifaceFromNetlinkLink) but it is private, hence the containerNetlinkIface.Attrs().HardwareAddr.String(). We could use a more elegant solution but this one is quite simple.
I tested it (really not extensively) with containerd and it works.
As explained in the issue, I may have missed something in the logic of unnumbered-ptp plugin regarding the current behavior.
Fixes #33 by avoiding to overwrite the output of the ipvlan plugin (interfaces) and not associating IPs created by the ipvlan plugin to veth0.
In addition, ip.SetupVeth does not retrieve MAC address from peer in veth so the field is empty. There is a method to create an net.interface from a netlink.link in package
github.com/containernetworking/plugins/pkg/ip
(ifaceFromNetlinkLink) but it is private, hence thecontainerNetlinkIface.Attrs().HardwareAddr.String()
. We could use a more elegant solution but this one is quite simple.I tested it (really not extensively) with containerd and it works.
As explained in the issue, I may have missed something in the logic of unnumbered-ptp plugin regarding the current behavior.
Plugin output before fix:
Plugin output with patch: