Bug 13951 - WireGuard CU200,201,203 - Import a Connection with multiple addresses results in an error Invalid Network
Summary: WireGuard CU200,201,203 - Import a Connection with multiple addresses results...
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: unspecified Unspecified
: - Unknown - Minor Usability
Assignee: Michael Tremer
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-15 07:56 UTC by iptom
Modified: 2026-07-20 16:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iptom 2026-03-15 07:56:10 UTC
When importing a configuration file containing multiple IP addresses,
e.g. AllowedIPs = 10.168.12.0/24, 10.168.13.0/24, 10.168.14.0/24
an error occurs 
Oops, something went wrong...

    Invalid Network 10.168.13.0/24
    Invalid Network 10.168.14.22/32

Once the spaces between the addresses have been removed,
e.g. AllowedIPs = 10.168.12.0/24,10.168.13.0/24,10.168.14.0/24 
the import proceeds without errors.

The configuration file was generated when the N2N connection was created on IPFire.

Regards
Comment 1 iptom 2026-06-15 15:36:29 UTC
The import issue also occurs in the Core-Update 203 Development Build: master/8024c29c
Comment 3 Michael Tremer 2026-07-09 15:58:58 UTC
Could you please confirm that this fixes the problem?

> https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=459e88ff5acbc0e6059665d6636a30445aa48c6b
Comment 4 iptom 2026-07-09 17:48:09 UTC
(In reply to Michael Tremer from comment #3)
> Could you please confirm that this fixes the problem?
> 
> > https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=459e88ff5acbc0e6059665d6636a30445aa48c6b


In the file `wireguard-functions.pl`, I made the recommended change shown below

# AllowedIPs
} elsif ($key eq "AllowedIPs") {
     my @networks = split(/\s*,\s*/, $val);

Following the above change, the import completed without any errors being reported.


Tested on Core-Update 203 Development Build: master/4b639c7e

Best Regards
Comment 5 Michael Tremer 2026-07-20 16:14:16 UTC
Core Update 203 has been released:

> https://www.ipfire.org/blog/ipfire-2-29-core-update-203-released