[ ipcop-Bugs-3602741 ] Can't open 'connexions' in 'state' tab

SourceForge.net <[email protected]> Wed, 30 Jan 2013 19:11:54 -0800
Newsgroups gmane.comp.security.ipcop.devel
Message-ID <[email protected]>
Bugs item #3602741, was opened at 2013-01-30 19:11
Message generated for change (Tracker Item Submitted) made by tox82
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428516&aid=3602741&group_id=40604

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: User Interface
Group: 2.0.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: tox82 (tox82)
Assigned to: Nobody/Anonymous (nobody)
Summary: Can't open 'connexions' in 'state' tab

Initial Comment:
Last night I have this error :
Can't call method "addr" on an undefined value at /home/httpd/cgi-bin/connections.cgi line 187

Finaly I fix it like that in file /home/httpd/cgi-bin/connections.cgi :

SEARCH :

# Add Green, Blue, Orange Network
foreach my $interface ("GREEN","ORANGE","BLUE") {
    $icount = $netsettings{"${interface}_COUNT"};
    while ($icount > 0) {

            my $ip = new NetAddr::IP($netsettings{"${interface}_${icount}_ADDRESS"}, $netsettings{"${interface}_${icount}_NETMASK"})
            my $lc_colour = "ipcop_iface_bg_".lc(${interface});

            # Add Firewall Interface
            push(@network, $ip->addr());
            push(@colour,  'ipcop_iface_bg_fw');
            push(@ports, '0');
            push(@protocols, '');

            # Add Broadcast address
            push(@network, $ip->broadcast()->addr());
            push(@colour,  'ipcop_iface_bg_fw');
            push(@ports, '0');
            push(@protocols, '');

            # Add Network
            push(@network, $ip->network());
            push(@colour,  $lc_colour);
            push(@ports, '0');
            push(@protocols, '');

            # Add Routes
            @routes = `/sbin/ip route list | /bin/grep 'via.*$netsettings{"${interface}_${icount}_DEV"}'`;
            foreach my $route (@routes) {
                chomp($route);
                my @temp = split(/[\t ]+/, $route);
                push(@network, $temp[0]);
                push(@colour,  'ipcop_iface_bg_green');
                push(@ports, '0');
                push(@protocols, '');
            }
        $icount--;
    }
}

AND REPLACE BY :

# Add Green, Blue, Orange Network
foreach my $interface ("GREEN","ORANGE","BLUE") {
    $icount = $netsettings{"${interface}_COUNT"};
    while ($icount > 0) {
        if(my $ip = new NetAddr::IP($netsettings{"${interface}_${icount}_ADDRESS"}, $netsettings{"${interface}_${icount}_NETMASK"})) {

                my $lc_colour = "ipcop_iface_bg_".lc(${interface});
                # Add Firewall Interface
                push(@network, $ip->addr());
                push(@colour,  'ipcop_iface_bg_fw');
                push(@ports, '0');
                push(@protocols, '');

                # Add Broadcast address
                push(@network, $ip->broadcast()->addr());
                push(@colour,  'ipcop_iface_bg_fw');
                push(@ports, '0');
                push(@protocols, '');

                # Add Network
                push(@network, $ip->network());
                push(@colour,  $lc_colour);
                push(@ports, '0');
                push(@protocols, '');

                # Add Routes
                @routes = `/sbin/ip route list | /bin/grep 'via.*$netsettings{"${interface}_${icount}_DEV"}'`;
                foreach my $route (@routes) {
                    chomp($route);
                    my @temp = split(/[\t ]+/, $route);
                    push(@network, $temp[0]);
                    push(@colour,  'ipcop_iface_bg_green');
                    push(@ports, '0');
                    push(@protocols, '');
                }
        }
        $icount--;
    }
}


I'm not professional, just its working now and I want to share this with you if it can help a little...
(sorry for my english, I'm french)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428516&aid=3602741&group_id=40604

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan