isc-dhcp-relay.patch
modif/isc-dhcp-relay 2017-12-05 11:04:38.932720248 +0100 | ||
---|---|---|
4 | 4 | |
5 | 5 |
SERVERS="%%adresse_ip_dhcp_dhcrelay" |
6 | 6 |
%if 'all' not in %%dhcrelay_interfaces |
7 |
%set %%dhc_server_int = %%getVar('nom_zone_' + %%dhcrelay_server_interface) |
|
7 | 8 |
OPTIONS="%slurp |
8 |
%if %%dhcrelay_server_interface not in %%dhcrelay_interfaces |
|
9 |
%for %%dhcrelay_int in %%dhcrelay_interfaces |
|
10 |
%if not %%is_empty(%%dhcrelay_int.dhcrelay_vlan) |
|
11 |
-i %%dhcrelay_int%slurp |
|
12 |
.%%dhcrelay_int.dhcrelay_vlan %slurp |
|
13 |
%else |
|
14 |
-i %%dhcrelay_int %slurp |
|
15 |
%end if |
|
16 |
%end for |
|
17 |
-i %%dhcrelay_server_interface" |
|
18 |
#OPTIONS="-i %%custom_join(%%dhcrelay_interfaces, ' -i ') -i %%dhcrelay_server_interface" |
|
19 |
%else |
|
20 |
%for %%dhcrelay_int in %%dhcrelay_interfaces |
|
21 |
%if not %%is_empty(%%dhcrelay_int.dhcrelay_vlan) |
|
22 |
-i %%dhcrelay_int%slurp |
|
23 |
.%%dhcrelay_int.dhcrelay_vlan %slurp |
|
24 |
%else |
|
25 |
-i %%dhcrelay_int %slurp |
|
26 |
%end if |
|
27 |
%end for |
|
28 |
" |
|
29 |
#OPTIONS="-i %%custom_join(%%dhcrelay_interfaces, ' -i ')" |
|
9 |
%set %%serv_int_ok = [] |
|
10 |
%for %%dhcrelay_int in %%dhcrelay_interfaces |
|
11 |
%if not %%is_empty(%%dhcrelay_int.dhcrelay_vlan) |
|
12 |
%set %%dhc_int = %%getVar('nom_zone_' + %%dhcrelay_int)+'.'+%%str(%%dhcrelay_int.dhcrelay_vlan) |
|
13 |
%else |
|
14 |
%set %%dhc_int = %%getVar('nom_zone_' + %%dhcrelay_int) |
|
15 |
%end if |
|
16 |
%if %%dhc_int == %%dhc_server_int |
|
17 |
%silent %%serv_int_ok.append('OK') |
|
18 |
%end if |
|
19 |
-i %%dhc_int %slurp |
|
20 |
%end for |
|
21 |
%if 'OK' not in %%serv_int_ok |
|
22 |
-i %%dhc_server_int%slurp |
|
30 | 23 |
%end if |
24 |
" |
|
31 | 25 |
%end if |
32 | 26 | |
33 | 27 |
# Define OPTIONS with any other options to pass to the dhcrelay server. |