Bug 1391424 - connection type ip-tunnel not shown in nmtui or nm-connection-editor
Summary: connection type ip-tunnel not shown in nmtui or nm-connection-editor
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Beniamino Galvani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-03 09:55 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2017-12-12 10:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:41:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2016-11-03 09:55:27 UTC
Description of problem:
Connections of ip-tunnel type are not visible in the interactive tools like nmtui or nm-connection-editor and can only be controlled using nmcli.

Version-Release number of selected component (if applicable):
NetworkManager-1.2.4-3.fc24.x86_64
NetworkManager-tui-1.2.4-3.fc24.x86_64
nm-connection-editor-1.2.4-2.fc24.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Create an ipv6 tunnel using nmcli, for example:
nmcli c add type ip-tunnel con-name sit1 ifname sit1 mode sit remote IPV4_SERVER -- connection.metered no ipv4.method disabled ipv6.method manual ipv6.address IPV6_CLIENT ipv6.gateway IPV6_SERVER ip-tunnel.ttl 64
2. Start nmtui or nm-connection-editor.

Actual results:
The newly created connection is not visible. It's only listed in `nmcli c' output.

Expected results:
Tunnel connection is visible and manageable using both nmtui and nm-connection-editor.

Comment 1 Beniamino Galvani 2016-11-04 13:51:48 UTC
Pushed nmtui support for ip-tunnel connections to bg/tui-ip-tunnel-rh1391424 branch for review.

Comment 2 Thomas Haller 2016-11-04 14:25:25 UTC
branch looks very nice. Only tiny complains.



>> ip-tunnel: fail the activation for unknown tunnel modes

the patch seems to change two things at once, I don't understand the reason for the change

+    if (mode == NM_IP_TUNNEL_MODE_UNKNOWN || link_type == NM_LINK_TYPE_UNKNOWN)

should be explained in the commit message.



I don't like:

     default:
-         g_return_val_if_reached (NM_LINK_TYPE_UNKNOWN);
+         return NM_LINK_TYPE_UNKNOWN;
     }

I think the "default:" label should be removed entirely, and all known enum values should be explicitly listed.

How about moving g_return_val_if_reached() outside the switch, and handle all expectedly-unknown values explicitly.




> tui: add support for IP tunnel connections


+#include "nm-default.h"
+
+#include "nm-editor-bindings.h"
+
+#include "nmt-page-ip-tunnel.h"

the order of includes should be

  #include "nm-default.h"

  #include "nmt-page-ip-tunnel.h"

  // optional system headers

  // optional internal nmtui headers

Comment 3 Beniamino Galvani 2016-11-07 15:51:55 UTC
(In reply to Thomas Haller from comment #2)
> >> ip-tunnel: fail the activation for unknown tunnel modes
> 
> the patch seems to change two things at once, I don't understand the reason
> for the change
> 
> +    if (mode == NM_IP_TUNNEL_MODE_UNKNOWN || link_type ==
> NM_LINK_TYPE_UNKNOWN)
> 
> should be explained in the commit message.

Amended the commit message, is it better now?

> I don't like:
> 
>      default:
> -         g_return_val_if_reached (NM_LINK_TYPE_UNKNOWN);
> +         return NM_LINK_TYPE_UNKNOWN;
>      }
> 
> I think the "default:" label should be removed entirely, and all known enum
> values should be explicitly listed.
> 
> How about moving g_return_val_if_reached() outside the switch, and handle
> all expectedly-unknown values explicitly.

I don't think we should have any assertion there. The enum of possible modes can be expanded in the future and so there shouldn't be any constraint on it. If one creates an IP-tunnel connection using a new mode and then downgrades NM, it would throw an assertion.

Instead I think we should accept everything, but fail the connection if we don't recognize the mode.

> > tui: add support for IP tunnel connections

> the order of includes should be
> 
>   #include "nm-default.h"
> 
>   #include "nmt-page-ip-tunnel.h"
> 
>   // optional system headers
> 
>   // optional internal nmtui headers

Fixed.

Comment 4 Thomas Haller 2016-11-08 08:57:08 UTC
(In reply to Beniamino Galvani from comment #3)
> (In reply to Thomas Haller from comment #2)

> I don't think we should have any assertion there. The enum of possible modes
> can be expanded in the future and so there shouldn't be any constraint on
> it. If one creates an IP-tunnel connection using a new mode and then
> downgrades NM, it would throw an assertion.

they can be extended, but then we should extend tunnel_mode_to_link_type() as well.

How about the two additional commits I pushed to your branch?



branch lgtm now

Comment 5 Beniamino Galvani 2016-11-08 13:52:19 UTC
(In reply to Thomas Haller from comment #4)
> (In reply to Beniamino Galvani from comment #3)
> > (In reply to Thomas Haller from comment #2)
> 
> > I don't think we should have any assertion there. The enum of possible modes
> > can be expanded in the future and so there shouldn't be any constraint on
> > it. If one creates an IP-tunnel connection using a new mode and then
> > downgrades NM, it would throw an assertion.
> 
> they can be extended, but then we should extend tunnel_mode_to_link_type()
> as well.
> 
> How about the two additional commits I pushed to your branch?

Look good, thanks.

Comment 6 Beniamino Galvani 2016-11-09 16:57:13 UTC
Branch bg/tui-ip-tunnel-rh1391424 merged to master:

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=d9b529b47b48af08f18193c238046b45247fb61e


nm-connection-editor support still to be done.

Comment 7 Dominik 'Rathann' Mierzejewski 2017-03-22 00:17:18 UTC
Bumping to F25 as I upgraded my machine.

Comment 8 Thomas Haller 2017-04-13 13:58:54 UTC
support for IP tunnels have been added to nmtui and nm-connection-editor.

Hence, this bug has been fixed upstream. Moving bug state to MODIFIED.




nm-applet doesn't allow you to activate such connection types.
With respect of nm-applet support, that would warrant a different bug... or maybe it's out of scope for the applet anyway...

Comment 9 Fedora End Of Life 2017-11-16 19:01:21 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 10 Dominik 'Rathann' Mierzejewski 2017-11-21 14:15:48 UTC
It looks like it's fixed in F26.

Comment 11 Fedora End Of Life 2017-12-12 10:41:47 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.