From a5c43479ce3d2c144f6f180ae0667c76f0d64ad7 Mon Sep 17 00:00:00 2001 From: Paul Wassi Date: Mon, 18 Sep 2017 18:23:30 +0200 Subject: [PATCH 1/2] net/rp-pppoe: fix typo in init script Due to a typo in the init scripts, certain parameters are not appended to the cmdline. (max. # of concurrent sessions). For backwards compatibility leave both spellings in place. Signed-off-by: Paul Wassi --- net/rp-pppoe/Makefile | 2 +- net/rp-pppoe/files/pppoe-relay.init | 6 ++++-- net/rp-pppoe/files/pppoe-server.init | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/net/rp-pppoe/Makefile b/net/rp-pppoe/Makefile index 4b80ac00b..404dd430f 100644 --- a/net/rp-pppoe/Makefile +++ b/net/rp-pppoe/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rp-pppoe PKG_VERSION:=3.12 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Daniel Dickinson PKG_LICENSE:=LGPL-2.0+ diff --git a/net/rp-pppoe/files/pppoe-relay.init b/net/rp-pppoe/files/pppoe-relay.init index 4aeeee8c1..43ab7ea6d 100755 --- a/net/rp-pppoe/files/pppoe-relay.init +++ b/net/rp-pppoe/files/pppoe-relay.init @@ -23,11 +23,12 @@ pppoe_triggers() { pppoe_relay_instance() { local cfg="$1" - local interface server_interfaces client_interfaces both_interfaces maxsessions timeout OPTIONS + local interface server_interfaces client_interfaces both_interfaces maxsessions maxsesssions timeout OPTIONS config_get server_interfaces "$cfg" server_interface config_get client_interfaces "$cfg" client_interface config_get both_interfaces "$cfg" both_interfaces - config_get maxsessions "$cfg" maxsesssions + config_get maxsessions "$cfg" maxsessions + config_get maxsesssions "$cfg" maxsesssions config_get timeout "$cfg" timeout config_get_bool use_non_uci_config "$cfg" use_non_uci_config 0 @@ -44,6 +45,7 @@ pppoe_relay_instance() { for interface in $both_interfaces; do append OPTIONS "-B $interface" done + [ -n "$maxsessions" ] && append OPTIONS "-n $maxsessions" [ -n "$maxsesssions" ] && append OPTIONS "-n $maxsesssions" [ -n "$timeout" ] && append OPTIONS "-i $timeout" fi diff --git a/net/rp-pppoe/files/pppoe-server.init b/net/rp-pppoe/files/pppoe-server.init index dd2568ec8..63f02cef6 100755 --- a/net/rp-pppoe/files/pppoe-server.init +++ b/net/rp-pppoe/files/pppoe-server.init @@ -12,11 +12,12 @@ pppoe_triggers() { pppoe_instance() { local cfg="$1" - local interface ac_name service_names service_name maxsessionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS + local interface ac_name service_names service_name maxsessionsperpeer maxsesssionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS config_get interface "$cfg" interface config_get ac_name "$cfg" ac_name config_get service_names "$cfg" service_name - config_get maxsessionsperpeer "$cfg" maxsesssionsperpeer + config_get maxsessionsperpeer "$cfg" maxsessionsperpeer + config_get maxsesssionsperpeer "$cfg" maxsesssionsperpeer config_get localip "$cfg" localip config_get firstremoteip "$cfg" firstremoteip config_get maxsessions "$cfg" maxsessions @@ -38,6 +39,7 @@ pppoe_instance() { append OPTIONS "-S $service_name" done append OPTIONS "-I $interface" + [ -n "$maxsessionsperpeer" ] && append OPTIONS "-x $maxsessionsperpeer" [ -n "$maxsesssionsperpeer" ] && append OPTIONS "-x $maxsesssionsperpeer" [ -n "$localip" ] && append OPTIONS "-L $localip" [ -n "$firstremoteip" ] && append OPTIONS "-R $firstremoteip" From 89c7fa089e0f9ac16f51fb5a2315ccd17eec3544 Mon Sep 17 00:00:00 2001 From: Paul Wassi Date: Wed, 4 Oct 2017 16:14:51 +0200 Subject: [PATCH 2/2] net/rp-pppoe: cleanup config options Remove misspelled configuration options which were left in place for reasons of backwards-compatibility. Signed-off-by: Paul Wassi --- net/rp-pppoe/Makefile | 2 +- net/rp-pppoe/files/pppoe-relay.init | 4 +--- net/rp-pppoe/files/pppoe-server.init | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/net/rp-pppoe/Makefile b/net/rp-pppoe/Makefile index 404dd430f..26b492737 100644 --- a/net/rp-pppoe/Makefile +++ b/net/rp-pppoe/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rp-pppoe PKG_VERSION:=3.12 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=Daniel Dickinson PKG_LICENSE:=LGPL-2.0+ diff --git a/net/rp-pppoe/files/pppoe-relay.init b/net/rp-pppoe/files/pppoe-relay.init index 43ab7ea6d..1c9b16ec7 100755 --- a/net/rp-pppoe/files/pppoe-relay.init +++ b/net/rp-pppoe/files/pppoe-relay.init @@ -23,12 +23,11 @@ pppoe_triggers() { pppoe_relay_instance() { local cfg="$1" - local interface server_interfaces client_interfaces both_interfaces maxsessions maxsesssions timeout OPTIONS + local interface server_interfaces client_interfaces both_interfaces maxsessions timeout OPTIONS config_get server_interfaces "$cfg" server_interface config_get client_interfaces "$cfg" client_interface config_get both_interfaces "$cfg" both_interfaces config_get maxsessions "$cfg" maxsessions - config_get maxsesssions "$cfg" maxsesssions config_get timeout "$cfg" timeout config_get_bool use_non_uci_config "$cfg" use_non_uci_config 0 @@ -46,7 +45,6 @@ pppoe_relay_instance() { append OPTIONS "-B $interface" done [ -n "$maxsessions" ] && append OPTIONS "-n $maxsessions" - [ -n "$maxsesssions" ] && append OPTIONS "-n $maxsesssions" [ -n "$timeout" ] && append OPTIONS "-i $timeout" fi diff --git a/net/rp-pppoe/files/pppoe-server.init b/net/rp-pppoe/files/pppoe-server.init index 63f02cef6..f3a53dfd6 100755 --- a/net/rp-pppoe/files/pppoe-server.init +++ b/net/rp-pppoe/files/pppoe-server.init @@ -12,12 +12,11 @@ pppoe_triggers() { pppoe_instance() { local cfg="$1" - local interface ac_name service_names service_name maxsessionsperpeer maxsesssionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS + local interface ac_name service_names service_name maxsessionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS config_get interface "$cfg" interface config_get ac_name "$cfg" ac_name config_get service_names "$cfg" service_name config_get maxsessionsperpeer "$cfg" maxsessionsperpeer - config_get maxsesssionsperpeer "$cfg" maxsesssionsperpeer config_get localip "$cfg" localip config_get firstremoteip "$cfg" firstremoteip config_get maxsessions "$cfg" maxsessions @@ -40,7 +39,6 @@ pppoe_instance() { done append OPTIONS "-I $interface" [ -n "$maxsessionsperpeer" ] && append OPTIONS "-x $maxsessionsperpeer" - [ -n "$maxsesssionsperpeer" ] && append OPTIONS "-x $maxsesssionsperpeer" [ -n "$localip" ] && append OPTIONS "-L $localip" [ -n "$firstremoteip" ] && append OPTIONS "-R $firstremoteip" [ -n "maxsessions" ] && append OPTIONS "-N $maxsessions"