From 86b64d6454b515c086d702f1e77bb656f721ca5b Mon Sep 17 00:00:00 2001 From: Dan Ankers Date: Fri, 28 Jun 2024 20:42:16 +0100 Subject: [PATCH] Correct IP address --- juniper-macros.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/juniper-macros.j2 b/juniper-macros.j2 index bfcc106..6a9d734 100644 --- a/juniper-macros.j2 +++ b/juniper-macros.j2 @@ -252,7 +252,7 @@ routing-options { session-mode automatic; } {% for interface in device.interfaces.filter(cable__isnull=False) %} - neighbor {{ interface.connected_endpoints[0].primary_ip4.address.ip }}; + neighbor {{ interface.connected_endpoints[0].addresses.first().address.ip }}; {% endfor %} } {%- endmacro %} @@ -272,7 +272,7 @@ routing-options { multiple-as; } {% for interface in device.interfaces.filter(cable__isnull=False) %} - neighbor {{ interface.connected_endpoints[0].primary_ip4.address.ip }} { + neighbor {{ interface.connected_endpoints[0].addresses.first().address.ip }} { peer-as {{ interface.connected_endpoints[0].local_context_data['underlay_as'] }}; } {% endfor %}