mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Relayd bugfix (#1560)
This commit is contained in:
committed by
Franco Fichtner
parent
f2c7589c73
commit
ecd22122b9
+1
-1
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= relayd
|
||||
PLUGIN_VERSION= 2.3
|
||||
PLUGIN_VERSION= 2.4
|
||||
PLUGIN_DEPENDS= relayd
|
||||
PLUGIN_COMMENT= Relayd Load Balancer
|
||||
PLUGIN_MAINTAINER= frank.brendel@eurolog.com
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 EURO-LOG AG
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
namespace OPNsense\Relayd\Migrations;
|
||||
|
||||
use OPNsense\Base\BaseModelMigration;
|
||||
|
||||
class M1_0_2 extends BaseModelMigration
|
||||
{
|
||||
public function run($model)
|
||||
{
|
||||
// migrate old protocol definitions; only TCP seems to have worked
|
||||
// see https://github.com/opnsense/plugins/issues/1464
|
||||
foreach ($model->getNodeByReference('protocol')->iterateItems() as $protocol) {
|
||||
if ((string)$protocol->type == 'tcp') {
|
||||
$protocol->options = 'tcp { ' . (string)$protocol->options . ' }';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<model>
|
||||
<mount>//OPNsense/relayd</mount>
|
||||
<version>1.0.1</version>
|
||||
<version>1.0.2</version>
|
||||
<description>Relayd settings</description>
|
||||
<items>
|
||||
<general>
|
||||
|
||||
@@ -38,8 +38,8 @@ table <{{ name }}>{{ disable }} {
|
||||
|
||||
{% if helpers.exists('OPNsense.relayd.protocol') %}
|
||||
{% for protocol in helpers.toList('OPNsense.relayd.protocol') %}
|
||||
protocol "{{protocol.name}}" {
|
||||
{{ protocol.type }} { {{ protocol.options }} }
|
||||
{{ protocol.type }} protocol "{{protocol.name}}" {
|
||||
{{ protocol.options }}
|
||||
}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user