plan9front/rc
cinap_lenrek c690c0b9f3 ethermultilink: switch between different physical interfaces based on link status
This adds the capability of specifying multiple
interfaces on bootargs like:

bootargs=tls!ether /net/ether1 ether /net/ether0 ...

which will be combined into a bridge and the new
ethermultilink script can dynamically add/remove
the interfaces based on link status.

a ethersink interface is used as the primary,
taking the mac address of the first secondary
interface.

this required some changes in how ethernets
and bridges interact, as bridge mode on a
ethernet interface would only forward
frames not desinted to the interfaces mac address.

we make promisc mode ethernet connections never
loop-back the frames written them
and we add a new "ethermac" type to devbridge
that uses promisc mode only without setting
bridge flag.

that way, we can attach a ethernet to a bridge
and get all its frames.

the result is that we can specify the wifi
interface as the first interface and ethernet
as the second interface and the system
will roam to ethernet transparently when the
ethernet cable is plugged in and switch back
to wifi when ethernet cable is disconnected.
2023-07-16 16:15:09 +00:00
..
bin ethermultilink: switch between different physical interfaces based on link status 2023-07-16 16:15:09 +00:00
lib rc: use /fd/0 for standard-input instead of '#d/0' in non-interactive mode 2022-12-12 21:21:22 +00:00