shithub: riscv

Download patch

ref: 2153eb179c21589a991625acba967c69aad1e5d9
parent: 934d81ae4e55fb48f7d15ee7302d455f3ba33a82
author: cinap_lenrek <[email protected]>
date: Sun Jul 23 18:22:48 EDT 2023

ethermultilink: send gratious arp instead of flushing arp cache

--- a/rc/bin/ethermultilink
+++ b/rc/bin/ethermultilink
@@ -50,9 +50,11 @@
 			echo bind bypass primary 0 $primary
 			echo bind ether secondary 0 $new
 		}
-		# make switches aware of the new path
-		echo flush > $net/arp
 
+		# do gratious arp on the new path
+		for(ip in `{awk '$3=="4u" || $3=="6u" {print $1}' $net/ipselftab}){
+			echo garp $ip > $net/arp || echo flush > $net/arp
+		}
 		old=$new
 	}
 	sleep 1