jpetazzo / pipework

Software-Defined Networking tools for LXC (LinuX Containers)
Apache License 2.0
4.21k stars 727 forks source link

Allow to specify host interface via mac address #222

Closed ymaclook closed 4 years ago

ymaclook commented 6 years ago

When using commands such as:

pipework --direct-phys eth0 -i iface1 <docker_pid> 0/0

The physical interface eth0 gets renamed as iface1 in the host context and the behavior is not idempotent. Adding support to specify the interface through its MAC address, such as:

pipework --direct-phys mac:00:f3:15:4a:42:c8 -i iface1 <docker_pid> 0/0

This may be useful when the physical interface to "pipework" is eth0 (might already exist in a "usual" docker container).

jpetazzo commented 6 years ago

That seems innocent enough, so I think I can merge it!

Can you however add a paragraph about it in the docs, please?

Thank you so much for the contribution!

ymaclook commented 6 years ago

Hi @jpetazzo, you are welcome! Everyone should thank you for this pipework toolbox, so do I :smile: Tell me if the docs fits your needs.