Project

General

Profile

« Previous | Next » 

Revision 941eca9a

Added by Jim Pingle almost 3 years ago

Fix handling of empty entries in NTP interfaces.

View differences:

src/etc/inc/system.inc
2196 2196

  
2197 2197
	if (is_array($interfaces) && count($interfaces)) {
2198 2198
		$finterfaces = array();
2199
		$ntpcfg .= "interface ignore all\n";
2200
		$ntpcfg .= "interface ignore wildcard\n";
2201 2199
		foreach ($interfaces as $interface) {
2202 2200
			$interface = get_real_interface($interface);
2203 2201
			if (!empty($interface)) {
2204 2202
				$finterfaces[] = $interface;
2205 2203
			}
2206 2204
		}
2207
		foreach ($finterfaces as $interface) {
2208
			$ntpcfg .= "interface listen {$interface}\n";
2205
		if (!empty($finterfaces)) {
2206
			$ntpcfg .= "interface ignore all\n";
2207
			$ntpcfg .= "interface ignore wildcard\n";
2208
			foreach ($finterfaces as $interface) {
2209
				$ntpcfg .= "interface listen {$interface}\n";
2210
			}
2209 2211
		}
2210 2212
	}
2211 2213

  

Also available in: Unified diff