mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Fix default load balancing routes
This commit is contained in:
		
							parent
							
								
									e3c143a3fd
								
							
						
					
					
						commit
						d40c1f796a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -370,7 +370,7 @@ fi
 | 
			
		|||
multipath_config=$(uci -q get "network.$OMR_TRACKER_INTERFACE.multipath")
 | 
			
		||||
[ -z "$multipath_config" ] && multipath_config=$(uci -q get "openmptcprouter.$OMR_TRACKER_INTERFACE.multipath" || echo "off")
 | 
			
		||||
if [ "$multipath_config" = "master" ]; then
 | 
			
		||||
	if ([ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]) && [ "$OMR_TRACKER_DEVICE_GATEWAY" != "" ] && [ "$(uci -q get openmptcprouter.settings.loadbalancing)" != "1" ]; then
 | 
			
		||||
	if ([ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]) && [ "$OMR_TRACKER_DEVICE_GATEWAY" != "" ] && [ "$(uci -q get openmptcprouter.settings.master)" != "balancing" ]; then
 | 
			
		||||
		omrvpn_intf=$(uci -q get "network.omrvpn.ifname" || echo "tun")
 | 
			
		||||
		if [ -n "$omrvpn_intf" ] && [ "$(ip route show default | awk '/default/ {print $5}' | grep $omrvpn_intf)" = "" ]; then
 | 
			
		||||
			_log "Master up : Replace default route by $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue