summaryrefslogtreecommitdiff
path: root/data/templates/router-advert/radvd.conf.tmpl
blob: 4be6797ee39ca7472193fb3d91d4feca1cc434ac (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
### Autogenerated by service_router-advert.py ###

{% if interface is defined and interface is not none %}
{%   for iface, iface_config in interface.items() %}
interface {{ iface }} {
    IgnoreIfMissing on;
{%     if iface_config.default_preference is defined and iface_config.default_preference is not none %}
    AdvDefaultPreference {{ iface_config.default_preference }};
{%     endif %}
{%     if iface_config.managed_flag is defined and iface_config.managed_flag is not none %}
    AdvManagedFlag {{ 'on' if iface_config.managed_flag is defined else 'off' }};
{%     endif %}
{%     if iface_config.interval.max is defined and iface_config.interval.max is not none %}
    MaxRtrAdvInterval {{ iface_config.interval.max }};
{%     endif %}
{%     if iface_config.interval.min is defined and iface_config.interval.min is not none %}
    MinRtrAdvInterval {{ iface_config.interval.min }};
{%   endif %}
{%     if iface_config.reachable_time is defined and iface_config.reachable_time is not none %}
    AdvReachableTime {{ iface_config.reachable_time }};
{%   endif %}
    AdvIntervalOpt {{ 'off' if iface_config.no_send_advert is defined else 'on' }};
    AdvSendAdvert {{ 'off' if iface_config.no_send_advert is defined else 'on' }};
{%     if iface_config.default_lifetime is defined %}
    AdvDefaultLifetime {{ iface_config.default_lifetime }};
{%     endif %}
{%     if iface_config.link_mtu is defined %}
    AdvLinkMTU {{ iface_config.link_mtu }};
{%     endif %}
    AdvOtherConfigFlag {{ 'on' if iface_config.other_config_flag is defined else 'off' }};
    AdvRetransTimer {{ iface_config.retrans_timer }};
    AdvCurHopLimit {{ iface_config.hop_limit }};
{%     if iface_config.route is defined %}
{%       for route, route_options in iface_config.route.items() %}
    route {{ route }} {
{%         if route_options.valid_lifetime is defined %}
        AdvRouteLifetime {{ route_options.valid_lifetime }};
{%         endif %}
{%         if route_options.route_preference is defined %}
        AdvRoutePreference {{ route_options.route_preference }};
{%         endif %}
        RemoveRoute {{ 'off' if route_options.no_remove_route is defined else 'on' }};
    };
{%       endfor %}
{%     endif %}
{%         if iface_config.source_address is defined %}
    AdvRASrcAddress {
{%             for source_address in iface_config.source_address %}
        {{ source_address }};
{%             endfor %}
    };
{%         endif %}
{%     if iface_config.prefix is defined and iface_config.prefix is not none %}
{%       for prefix, prefix_options in iface_config.prefix.items() %}
    prefix {{ prefix }} {
        AdvAutonomous {{ 'off' if prefix_options.no_autonomous_flag is defined else 'on' }};
        AdvValidLifetime {{ prefix_options.valid_lifetime }};
        AdvOnLink {{ 'off' if prefix_options.no_on_link_flag is defined else 'on' }};
        AdvPreferredLifetime {{ prefix_options.preferred_lifetime }};
    };
{%       endfor %}
{%     endif %}
{%     if iface_config.name_server is defined %}
    RDNSS {{ iface_config.name_server | join(" ") }} {
    };
{%     endif %}
{%     if iface_config.dnssl is defined %}
    DNSSL {{ iface_config.dnssl | join(" ") }} {
    };
{%     endif %}
};
{%   endfor %}
{% endif %}