mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
Interfaces: Other Types: VLAN - allow manual proto selection, closes https://github.com/opnsense/core/issues/6679
This commit is contained in:
parent
c3db32722d
commit
6487a9b62e
@ -161,7 +161,9 @@ function interfaces_vlan_configure($verbose = false)
|
||||
}
|
||||
}
|
||||
foreach ($config['vlans']['vlan'] as $vlan) {
|
||||
$vlan['proto'] = empty($all_parents[$vlan['vlanif']]) ? '802.1q' : '802.1ad';
|
||||
if (empty($vlan['proto'])) {
|
||||
$vlan['proto'] = empty($all_parents[$vlan['vlanif']]) ? '802.1q' : '802.1ad';
|
||||
}
|
||||
_interfaces_vlan_configure($vlan);
|
||||
}
|
||||
|
||||
|
||||
@ -27,6 +27,15 @@
|
||||
<type>dropdown</type>
|
||||
<help>802.1Q VLAN PCP (priority code point)</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>vlan.proto</id>
|
||||
<type>dropdown</type>
|
||||
<advanced>true</advanced>
|
||||
<help>
|
||||
Enforce protocol selection, 802.1Qis the default for vlan interfaces,
|
||||
802.1ad is used when the parent is a vlan (QinQ)
|
||||
</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>vlan.descr</id>
|
||||
<label>Description</label>
|
||||
|
||||
@ -42,6 +42,14 @@
|
||||
<pcp7 value="7">Network Control (7, highest)</pcp7>
|
||||
</OptionValues>
|
||||
</pcp>
|
||||
<proto type="OptionField">
|
||||
<Required>N</Required>
|
||||
<BlankDesc>Auto</BlankDesc>
|
||||
<OptionValues>
|
||||
<opt1 value="802.1q">802.1Q</opt1>
|
||||
<opt2 value="802.1ad">802.1ad</opt2>
|
||||
</OptionValues>
|
||||
</proto>
|
||||
<descr type="TextField">
|
||||
<Required>N</Required>
|
||||
</descr>
|
||||
|
||||
@ -74,7 +74,9 @@ foreach (legacy_interfaces_details() as $ifname => $ifdetails) {
|
||||
legacy_interface_destroy($ifname);
|
||||
} else {
|
||||
$vlan = $all_vlans[$ifname];
|
||||
$vlan['proto'] = empty($all_parents[$vlan['vlanif']]) ? '802.1q' : '802.1ad';
|
||||
if (empty($vlan['proto'])) {
|
||||
$vlan['proto'] = empty($all_parents[$vlan['vlanif']]) ? '802.1q' : '802.1ad';
|
||||
}
|
||||
$cvlan = $ifdetails['vlan'];
|
||||
if ($vlan['tag'] != $cvlan['tag'] || $vlan['if'] != $cvlan['parent']) {
|
||||
/* option 2: changed vlan, unlink and relink */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user