WIO 1.3.2-19 not compatible with latest IPFire versions: CGI errors with public IP addresses

Problem description

After upgrading IPFire to the latest available versions (current Core Update), I found a problem with the WIO addon version 1.3.2-19.

Before the upgrade WIO was working correctly. After the upgrade, when I add an IP address that is not part of the local IPFire interfaces (for example an external public IP address), the WIO CGI page stops loading and terminates with an error.

Local IP addresses are handled correctly.

Apache log error

The first error was:

Undefined subroutine &General::GetDyndnsRedIP called at /srv/web/ipfire/cgi-bin/wio.cgi line 1166

The WIO code was calling a function that is no longer available in the General namespace.

The function still exists in:

/var/ipfire/http-client-functions.pl

as:

sub GetDyndnsRedIP

I temporarily modified WIO by removing the DynDNS synchronization check in that section.

After that, another error appeared:

Undefined subroutine &General::ipcidr2msk called at /srv/web/ipfire/cgi-bin/wio.cgi line 1586

The affected code was:

my $convertip = &General::ipcidr2msk($ovpnccdconfhash{$key}[1]);

This function is also no longer available in the General module.

After replacing this CIDR/netmask conversion locally, WIO started working correctly again, including with external public IP addresses.

Conclusion

There appears to be a compatibility issue between WIO 1.3.2-19 and the Perl libraries included in recent IPFire versions.

WIO seems to rely on older functions from the General module that have been moved, renamed, or removed.

A WIO update would probably be needed to use the current IPFire functions or to provide compatibility with newer IPFire releases.

Thank you.

I am aware of that one.

This I had not heard about from other users.

Please raise a bug on these errors and I will work on resolving it when I am able to put some time onto it.

Thank you very much for your prompt reply.

When I went to configure the WIO addon, I noticed that the page was “broken”, so I investigated the issue and this is what I found.

So, no problem, I will try to report the bug. Could you please provide me with the link where I can open the bug report?

If it can help, I can restore wio.cgi to its original state and send a screenshot of the broken page. Would that be useful?

Thank you again, and have a nice Sunday.:blush:

I think you need to check this one out. Your copy of wio.cgi must have an error in it.

In my version and the one in the next repository the line with GetDyndnsRedIP has the following

$bgcolor = ( &General::DyndnsServiceSync (&HTTPClient::GetDyndnsRedIP,$temp[1],$temp[2]) ? "$Header::colourgreen" : "$Header::colourred" );

so
&HTTPClient::GetDyndnsRedIP
and not
&General::GetDyndnsRedIP
as shown in your error message.

If your copy of wio.cgi has &General::GetDyndnsRedIP in line 1167 then this must have been manually edited with a typo.

It is in the documentation.

https://www.ipfire.org/docs/devel/bugzilla

I have reported the bug. I am sending you the link.

Is that okay?

Thank you very much.:blush: :+1:

That is fine.

However, as I mentioned in post 4, there must be an error in your specific copy of wio.cgi, maybe a typo when you were editing things.

GetDyndnsRedIP has never come from general-functions.pl (General location in your error message.

GetDyndnsRedIP has always been in http-client-functions.pl

So that part is not an actual bug but the ipcidr2msk function has been removed from general-functions.pl and the capability either needs to be obtained from other functions in general-functions.pl or the code calling it should be removed if the capability is not really needed in wio. I am looking at that.

Yes, it’s very possible that I made a typo. If necessary, you can edit my post. I don’t want to cause any confusion. Those were just some quick tests I did on the fly.:blush:

Thank you for the clarification.
I understand that GetDyndnsRedIP has always been present in http-client-functions.pl. However, I would like to point out that I have never manually modified wio.cgi.
Before opening the bug report, I also tried uninstalling and reinstalling the WIO addon, but the problem was still reproducible.
Could there be an issue with the WIO package distributed through Pakfire or with the package build process?

Reinstalling wio will just take the version from your cache if there is not a newer version available.

Before trying to install again can you paste line 1167 from your wio.cgi

I would also suggest having this input in the bug report rather than in the forum otherwise some info will not be shown in the bug report unless it is also duplicated there by someone.

I know; in fact, I also tried clearing the cache in
/opt/pakfire/db/meta
/var/cache/pakfire
So the package was downloaded again, but with the same results.

		$bgcolor = ( &General::DyndnsServiceSync (&HTTPClient::GetDyndnsRedIP,$temp[1],$temp[2]) ? "$Header::colourgreen" : "$Header::colourred" );

I apologize. I’m getting confused between the forum and the issue I opened. From now on, I’ll only comment on the issue I opened. This is the first time I’ve interacted with Bugzilla this frequently.

I have described all the detailed steps related to the bug report I opened. I hope I have explained everything clearly.

It will be interesting to understand whether this is an issue specific to my IPFire installation or if it affects other users as well. Perhaps other users are experiencing the same problem.

In the meantime, I can continue using my local workaround while waiting to better understand the root cause of the issue.

A big thank you to all the developers and contributors of the IPFire community for your time, support, and the excellent work you do every day.:blush: :slightly_smiling_face: :+1: