Page MenuHomeVyOS Platform

Unhandled template error in "generate ipsec profile ios-remote-access"
Closed, ResolvedPublicBUG

Description

vyos@vyos:~$ generate ipsec profile ios-remote-access rw remote ipsec.vyos.net name VYOS-NET profile VYOS

(1) Encryption AES-256, Integrity SHA2-512, DH group 14
(2) Encryption AES-256, Integrity SHA2-256, DH group 14
(3) Encryption AES-128-GCM, Integrity SHA2-256, DH group 14

Select one of the above IKE groups:  1

(1) Encryption AES-256, Integrity SHA2-512
(2) Encryption AES-256, Integrity SHA2-384
(3) Encryption AES-256, Integrity SHA2-256
(4) Encryption AES-256, Integrity SHA1-96
(5) Encryption AES-128-GCM, Integrity SHA2-256

Select one of the above ESP groups:  1


==== <snip> ====
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/ikev2_profile_generator.py", line 313, in <module>
    print(render_to_string('ipsec/ios_profile.j2', data))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/template.py", line 121, in render_to_string
    rendered = template.render(content)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/usr/share/vyos/templates/ipsec/ios_profile.j2", line 58, in top-level template code
    {% if authentication.client_mode.startswith("eap") %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'client_mode'

Details

Version
1.4.1
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

c-po changed the task status from Open to In progress.
c-po claimed this task.
c-po triaged this task as Normal priority.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
c-po moved this task from Backlog to Finished on the VyOS 1.4 Sagitta (1.4.2) board.
dmbaturin renamed this task from ipsec: "generate ipsec profile ios-remote-access" throws jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'client_mode' to Unhandled template error in "generate ipsec profile ios-remote-access".Wed, Mar 12, 5:38 PM