Revision 5ac2f583
Added by Ermal LUÇI about 15 years ago
etc/inc/services.inc | ||
---|---|---|
120 | 120 |
return 1; |
121 | 121 |
} |
122 | 122 |
|
123 |
$optcounter = 0; |
|
124 | 123 |
$custoptions = ""; |
125 | 124 |
foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) { |
126 | 125 |
if(is_array($dhcpifconf['numberoptions']) && is_array($dhcpifconf['numberoptions']['item'])) { |
127 |
foreach($dhcpifconf['numberoptions']['item'] as $item) { |
|
128 |
$custoptions .= "option custom-opt-$optcounter code {$item['number']} = text;\n"; |
|
129 |
$optcounter++; |
|
126 |
foreach($dhcpifconf['numberoptions']['item'] as $itemidx => $item) { |
|
127 |
$custoptions .= "option custom-{$dhcpif}-{$itemidx} code {$item['number']} = text;\n"; |
|
130 | 128 |
} |
131 | 129 |
} |
132 | 130 |
} |
... | ... | |
315 | 313 |
$dhcpdconf .= " option tftp-server-name \"{$dhcpifconf['tftp']}\";\n"; |
316 | 314 |
|
317 | 315 |
// Handle option, number rowhelper values |
318 |
$optcounter = 0; |
|
319 | 316 |
$dhcpdconf .= "\n"; |
320 | 317 |
if($dhcpifconf['numberoptions']['item']) { |
321 |
foreach($dhcpifconf['numberoptions']['item'] as $item) { |
|
322 |
$dhcpdconf .= " option custom-opt-$optcounter \"{$item['value']}\";\n"; |
|
323 |
$optcounter++; |
|
318 |
foreach($dhcpifconf['numberoptions']['item'] as $itemidx => $item) { |
|
319 |
$dhcpdconf .= " option custom-{$dhcpif}-{$itemidx} \"{$item['value']}\";\n"; |
|
324 | 320 |
} |
325 | 321 |
} |
326 | 322 |
|
Also available in: Unified diff
Ticket #499. Create custom options propperly for each interface. This solution binds the option name to the interface name so it is even easier to distinguish.