summaryrefslogtreecommitdiff
path: root/data/templates/router-advert/radvd.conf.tmpl
blob: 2fde78fec3c440d3e5491d096d79fa9834a20647 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
### Autogenerated by service_router-advert.py ###

{% if interface is defined and interface is not none %}
{%   for iface in interface %}
interface {{ iface }} {
    IgnoreIfMissing on;
{%     if interface[iface].default_preference is defined and interface[iface].default_preference is not none %}
    AdvDefaultPreference {{ interface[iface].default_preference }};
{%     endif %}
{%     if interface[iface].managed_flag is defined and interface[iface].managed_flag is not none %}
    AdvManagedFlag {{ 'on' if interface[iface].managed_flag is defined else 'off' }};
{%     endif %}
{%     if interface[iface].interval.max is defined and interface[iface].interval.max is not none %}
    MaxRtrAdvInterval {{ interface[iface].interval.max }};
{%     endif %}
{%     if interface[iface].interval.min is defined and interface[iface].interval.min is not none %}
    MinRtrAdvInterval {{ interface[iface].interval.min }};
{%   endif %}
{%     if interface[iface].reachable_time is defined and interface[iface].reachable_time is not none %}
    AdvReachableTime {{ interface[iface].reachable_time }};
{%   endif %}
    AdvIntervalOpt {{ 'off' if interface[iface].no_send_advert is defined else 'on' }};
    AdvSendAdvert {{ 'off' if interface[iface].no_send_advert is defined else 'on' }};
{%     if interface[iface].default_lifetime is defined %}
    AdvDefaultLifetime {{ interface[iface].default_lifetime }};
{%     endif %}
{%     if interface[iface].link_mtu is defined %}
    AdvLinkMTU {{ interface[iface].link_mtu }};
{%     endif %}
    AdvOtherConfigFlag {{ 'on' if interface[iface].other_config_flag is defined else 'off' }};
    AdvRetransTimer {{ interface[iface].retrans_timer }};
    AdvCurHopLimit {{ interface[iface].hop_limit }};
{%     for prefix in interface[iface].prefix %}
    prefix {{ prefix }} {
        AdvAutonomous {{ 'off' if interface[iface].prefix[prefix].no_autonomous_flag is defined else 'on' }};
        AdvValidLifetime {{ interface[iface].prefix[prefix].valid_lifetime }};
        AdvOnLink {{ 'off' if interface[iface].prefix[prefix].no_on_link_flag is defined else 'on' }};
        AdvPreferredLifetime {{ interface[iface].prefix[prefix].preferred_lifetime }};
    };
{%     endfor %}
{%     if interface[iface].name_server is defined %}
    RDNSS {{ interface[iface].name_server | join(" ") }} {
    };
{%     endif %}
};
{%   endfor %}
{% endif %}