Thanks for the details. Also how is the initrd built ? (i’d hate to unpackit, change it and pack it back, maybe you have some scripts or automated way). Does the initrd contain any reference to the kernel ? (modules compiled for the running kernel and located in the initrd, hardcoded paths, etc) ?
Regarding the ping approach please take into account that a) a lot of providers do icmp rate limiting on their routers
b) if let’s say you are doing traffic at 99% of the capacity of the line then packet loss will appear and you might switch over to the other link though the current one is ok.
The kernel implementation has it’s disadvantages too like if there is packet loss but still traffic works in both directions with the gateway the the traffic won’t be switched over to the other line ..