Project

General

Profile

« Previous | Next » 

Revision 3b5f0ecb

Added by Marcos M 4 months ago

Fall back to routing via the interface for dynamic gateway monitoring IPs

It's possible that when setup_gateways_monitor() is called, the gateway
address is not yet available. To avoid routing the monitoring address via
another gateway, fall back to routing via the gateway's interface instead.

View differences:

src/etc/inc/gwlb.inc
352 352
						route_add_or_change($gateway['monitor'],
353 353
						    '', $gateway['interface']);
354 354
						system_staticroutes_configure($gateway['friendlyiface']);
355
					} elseif ($gateway['gateway'] == 'dynamic') {
356
						route_add_or_change($gateway['monitor'],
357
						    '', $gateway['interface']);
355 358
					} else {
356 359
						route_add_or_change($gateway['monitor'],
357 360
						    $gateway['gateway']);
......
399 402
						route_add_or_change($gateway['monitor'],
400 403
						    '', $gateway['interface']);
401 404
						system_staticroutes_configure($gateway['friendlyiface']);
405
					} elseif ($gateway['gateway'] == 'dynamic') {
406
						route_add_or_change($gateway['monitor'],
407
						    '', $gateway['interface']);
402 408
					} else {
403 409
						route_add_or_change($gateway['monitor'],
404 410
						    $gateway['gateway']);

Also available in: Unified diff