mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Check netmask is really a netmask
This commit is contained in:
		
							parent
							
								
									6bccb867f4
								
							
						
					
					
						commit
						7ade591eaa
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -111,6 +111,7 @@ interface_multipath_settings() { | |||
| 			gateway=$(ubus call network.interface.${config}_4 status 2>/dev/null | jsonfilter -q -l 1 -e '@.route[@.target="0.0.0.0"].nexthop' | tr -d "\n") | ||||
| 		fi | ||||
| 		network_get_subnet netmask $config | ||||
| 		[ -n "$netmask" ] && [ "$(echo $netmask | grep '/')" != "" ] && netmask="" | ||||
| 		[ -z "$netmask" ] && netmask=$(ip -4 addr show dev $iface | grep peer | awk '{print $4}' | cut -d/ -f2 | tr -d "\n") | ||||
| 		[ -z "$netmask" ] && netmask=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f2 | tr -d "\n") | ||||
| 		[ -n "$ipaddr" ] && [ -n "$netmask" ] && netmask=`ipcalc.sh $ipaddr $netmask | sed -n '/NETMASK=/{;s/.*=//;s/ .*//;p;}'` | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue