mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Force metric for 6in4
This commit is contained in:
		
							parent
							
								
									52841c34c6
								
							
						
					
					
						commit
						1172142b85
					
				
					 2 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -31,6 +31,7 @@ while true; do
 | 
			
		|||
				uci -q batch <<-EOF
 | 
			
		||||
					set network.omr6in4.ipaddr=$addr
 | 
			
		||||
					set network.omr6in4.peeraddr=$peer
 | 
			
		||||
					set network.omr6in4.metric=1
 | 
			
		||||
					commit network
 | 
			
		||||
				EOF
 | 
			
		||||
				if [ -n "$(ip tunnel | grep omr6in4)" ]; then
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +50,7 @@ while true; do
 | 
			
		|||
				#[ -z "$ipv6_gw" ] && ipv6_gw='fe80::aff:ff01'
 | 
			
		||||
				ip -6 route add ${ipv6_gw} dev 6in4-omr6in4 > /dev/null 2>&1
 | 
			
		||||
				ip -6 route 2002::/16 dev 6in4-omr6in4 > /dev/null 2>&1
 | 
			
		||||
				ip -6 route replace default via ${ipv6_gw} dev 6in4-omr6in4 > /dev/null 2>&1
 | 
			
		||||
				ip -6 route replace default via ${ipv6_gw} dev 6in4-omr6in4 metric 1 > /dev/null 2>&1
 | 
			
		||||
				if [ "$(uci -q get openmptcprouter.settings.uci_route)" = "1" ]; then
 | 
			
		||||
					uci -q batch <<-EOF
 | 
			
		||||
						set network.omr6in4_route6_default=route6
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,6 +64,7 @@ set_ipv6_state() {
 | 
			
		|||
			set network.lan.ipv6="1"
 | 
			
		||||
			set network.lan.delegate="0"
 | 
			
		||||
			set network.omr6in4.force_link=1
 | 
			
		||||
			set network.omr6in4.metric=1
 | 
			
		||||
			delete network.omr6in4.auto
 | 
			
		||||
		EOF
 | 
			
		||||
		if [ "$(network.lan.ip6assign)" = "" ]; then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue