Commit graph

4 commits

Author SHA1 Message Date
cinap_lenrek
7137060d85 ethermultilink: ignore link-status of primary
when link-status on secondary is lost, always switch
back to the primary regardless of if it has a link.

this works around some ethernet driver not setting
link-status consistently and wifi's that might
only indicate a link when connected to an ap.
2023-12-07 14:48:49 +00:00
cinap_lenrek
2153eb179c ethermultilink: send gratious arp instead of flushing arp cache 2023-07-23 22:22:48 +00:00
cinap_lenrek
216ecc5460 ethermultilink: add "bypass" ctl for ethernet
Instead of having a ethersink with the same mac, implement
a "bypass" mechanism that lets us get access to the interfaces
frames and bypass the physical link.

Now no extra ethersink is required and a pre-existing
interface can be bridged transparently.
2023-07-22 17:23:06 +00:00
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