From 1ac4e6ae07da547bb0aa7845f7e5c245e59b7763 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Thu, 14 Jan 2016 23:35:35 -0600 Subject: Add config upgrade code to remove L7 config pieces, and file a notice where found. Ticket #5508 --- src/etc/inc/upgrade_config.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/etc/inc/upgrade_config.inc') diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 6217210..aa3ec70 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4269,4 +4269,20 @@ function upgrade_134_to_135() { $config['syslog']['nolognginx'] = true; } } + +function upgrade_135_to_136() { + global $config; + + if (isset($config['l7shaper'])) { + file_notice("L7shaper", "Layer 7 shaping is no longer supported. Its configuration has been removed."); + unset($config['l7shaper']); + if (is_array($config['filter']['rule'])) { + foreach ($config['filter']['rule'] as $idx => $rule) { + if (isset($rule['l7container'])) { + unset($config['filter']['rule'][$idx]['l7container']); + } + } + } + } +} ?> -- cgit v1.1