Cope better with no primary IP4

netbox
Daniel Ankers 2024-07-04 14:58:03 +01:00
parent 2617f6bdfe
commit bb7a882a46
1 changed files with 2 additions and 0 deletions

View File

@ -301,7 +301,9 @@ forwarding-options {
{% macro routingoptionssection(device, overlay_as = None, gateway = None, routes = None) %}
routing-options {
{% if device.primary_ip4 %}
router-id {{ device.primary_ip4.address.ip }};
{% endif %}
{% if overlay_as %}
autonomous-system {{ overlay_as }};
{% endif %}