mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Fix 6in4 support for MLVPN and OpenVPN
This commit is contained in:
		
							parent
							
								
									f536748542
								
							
						
					
					
						commit
						fa085dcdca
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -9,7 +9,13 @@ service_triggers() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
reload_service() {
 | 
			
		||||
	iface=$(uci -q get glorytun.vpn.dev)
 | 
			
		||||
	if [ "$(uci -q get glorytun.vpn.enable)" = "1" ]; then
 | 
			
		||||
		iface=$(uci -q get glorytun.vpn.dev)
 | 
			
		||||
	elif [ "$(uci -q get mlvpn.general.enable)" = "1" ]; then
 | 
			
		||||
		iface=$(uci -q get mlvpn.general.interface_name)
 | 
			
		||||
	elif [ "$(uci -q get openvpn.omr.enabled)" = "1" ]; then
 | 
			
		||||
		iface=$(uci -q get openvpn.omr.dev)
 | 
			
		||||
	fi
 | 
			
		||||
	addr=$(ubus call network.interface.omrvpn status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n")
 | 
			
		||||
	[ -z "$addr" ] && [ -n "$iface" ] && addr=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f1 | tr -d "\n")
 | 
			
		||||
	peer=$(ubus call network.interface.omrvpn status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue