Project

General

Profile

« Previous | Next » 

Revision 9b0c4cd7

Added by Scott Ullrich over 16 years ago

Reinsert default gateway if it is missing.

View differences:

etc/inc/system.inc
272 272
		fclose($fd);
273 273
	}
274 274

  
275
	/* Make sure default gateway is present */
276
	$result = `/usr/bin/netstat -rn | grep default`;
277
	if(!$result)
278
		if($config['interfaces']['wan']['gateway'])
279
			mwexec("/sbin/route add default " . escapeshellarg($config['interfaces']['wan']['gateway']));
280

  
275 281
	return 0;
276 282
}
277 283

  

Also available in: Unified diff