D15093: Add WireGuard capability.

Bruce Anderson noreply at phabricator.kde.org
Thu Sep 6 05:32:57 BST 2018


andersonbruce added inline comments.

INLINE COMMENTS

> jgrulich wrote in wireguard.cpp:71
> You can use simpleipv[4,6]validator we have in plasma-nm instead of using everything below. Or maybe QHostAddress can validate it for you?

The problem with using the simpleipv[4,6]validator is that WireGuard requires that in some cases the IP address can include a CIDR at the end (e.g. 10.2.4.6/32) and in another case the entry needs to have a port number (e.g. 10.2.3.5:7642) and the simpleip* functions won't handle either of these as currently written. QHostAddress will handle the CIDR but not the port number version. Also I'm not really thrilled with how QHostAddress does its verification. I know that it is technically correct but my personal opinion is that "1/32" should not be accepted as a valid IPv4 address which QHostAddress does.

REPOSITORY
  R116 Plasma Network Management Applet

REVISION DETAIL
  https://phabricator.kde.org/D15093

To: andersonbruce, #plasma, jgrulich, pino
Cc: acrouthamel, K900, pino, lbeltrame, ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180906/cb17e338/attachment.html>


More information about the Plasma-devel mailing list