
/mpls/ldp add lsr-id={{ ldp.router_id }} afi=ip

{% if 'ipv4' in loopback %}
/mpls/ldp set 0 transport-address={{ loopback.ipv4|ipaddr('address') }}
{% endif %}

{% if ldp.explicit_null|default(False) %}
/mpls/ldp set 0 use-explicit-null=yes
{% endif %}

{% for l in interfaces if ('ldp' in l) and not l.ldp.passive %}
/mpls/ldp/interface add interface={{ l.ifname }}
{% endfor %}
