Menu ▾ ▴

#5157 Perl error in Firewall module on Webmin 1.890

1.890
open
nobody
None
5
2018-07-20
2018-07-18
No

Just updated Webmin to 1.890 from debian sarge repo:

# cat /etc/apt/sources.list.d/webmin.list
deb http://download.webmin.com/download/repository sarge contrib

and I get this error when opening "Linux Firewall" module:

HTTP/1.0 500 Perl execution failed Server: MiniServ/1.890 Date: Wed, 18 Jul 2018 10:28:12 GMT Content-type: text/html; Charset=iso-8859-1 Connection: close

Error - Perl execution failed

Undefined subroutine &net::get_interface_defs called at debian-linux-lib.pl line 63. 

Webmin worked perfectly before updating to 1.890

Discussion

  • Claudio Nicora

    Claudio Nicora - 2018-07-18

    Sorry, missed system details:
    Ubuntu 18.04 Server x64

     
  • Claudio Nicora

    Claudio Nicora - 2018-07-18

    Just downgraded to 1.883 and it works, reupdated to 1.890 and "Linux Firewall" module stopped working again.

    Additional note: bug is only on Ubuntu 18.04, no issues on Ubuntu 16.04.4.

    Ubuntu 18.04 Server
    -------------------
    webmin-1.883: OK
    webmin-1.890: NOT OK
    
    Ubuntu 16.04.4 Server
    ---------------------
    webmin-1.883: OK
    webmin-1.890: OK
    
     
  • Sandro Santos

    Sandro Santos - 2018-07-18

    Same error in Ubuntu 17.10 (ipv4 and ipv6)

     
  • Act Pohomoc

    Act Pohomoc - 2018-07-20

    Ubuntu Linux 18.04 Desktop
    Same error:

    Rules file /etc/iptables.up.rules
    HTTP/1.0 500 Perl execution failed Server: MiniServ/1.890 Date: Fri, 20 Jul 2018 08:34:20 GMT Content-type: text/html; Charset=iso-8859-1 Connection: close
    Error - Perl execution failed
    Undefined subroutine &net::get_interface_defs called at debian-linux-lib.pl line 63.

     

    Last edit: Act Pohomoc 2018-07-20
  • Act Pohomoc

    Act Pohomoc - 2018-07-20

    I have found the solution. At least for now:
    https://github.com/webmin/webmin/issues/941

     
  • Act Pohomoc

    Act Pohomoc - 2018-07-20

    Just add that:

     if (&foreign_check("net")) { 
            &foreign_require("net");
            if (defined(&net::get_interface_def)) {
    

    total sub is:

    # started_at_boot()
    sub started_at_boot
    {
    &foreign_require("init", "init-lib.pl");
    if ($has_debian_iptables) {
        # Check Debian init script
        return &init::action_status("ip${ipvx}tables") == 2;
        }
    elsif ($has_new_debian_iptables) {
        # Check network interface config
        local $pri = &get_primary_network_interface();
       if (&foreign_check("net")) { 
            &foreign_require("net");
            if (defined(&net::get_interface_def)) {
                local ($debpri) = grep { $_->[0] eq $pri->{'fullname'} }
                           &net::get_interface_def();
                foreach my $o (@{$debpri->[3]}) {
                    if (($o->[0] eq "pre-up" || $o->[0] eq "post-up") &&
                        $o->[1] =~ /\S*ip${ipvx}tables-restore\s+<\s+(\S+)/ &&
                        $1 eq $ipvx_save) {
                        return 1;
                        }
                    }
                }
            }
        }
    else {
        # Check Webmin init script
        return &init::action_status("webmin-ip${ipvx}tables") == 2;
        }
    }
    
     

Log in to post a comment.