I haven't quite figured out the whole pull-request thing yet, but in the meantime, here's a fix for the problem of multiple empty "network" sections being inserted into /etc/config/vtun whenever you add a tunnel:
*** aredn_ar71xx/openwrt/files/www/cgi-bin/ucifunc.pm Mon Oct 26 15:47:22 2020
--- aredn_ar71xx/openwrt/files/www/cgi-bin/ucifunc.pm.NEW Sun Mar 14 14:59:56 2021
***************
*** 38,44 ****
sub uci_get_sectiontype_count()
{
my ($config, $stype)=@_;
! my $cmd=sprintf('uci show %s|egrep %s\.\@%s.*=%s|wc -l',$config,$stype,$stype,$stype);
my $res=`$cmd`;
my $rc=$?;
chomp($res);
--- 38,44 ----
sub uci_get_sectiontype_count()
{
my ($config, $stype)=@_;
! my $cmd=sprintf('uci show %s|egrep %s\.\@%s.*=%s|wc -l',$config,$config,$stype,$stype);
my $res=`$cmd`;
my $rc=$?;
chomp($res);
73,
- Paul, K3PGM
