remove ipv6 vlan

This commit is contained in:
devdatt 2025-12-23 15:55:40 +05:30
parent a410ed970e
commit 01f2313155
2 changed files with 0 additions and 94 deletions

View File

@ -16,7 +16,6 @@ $defaults = [
'network_primary_ipv6' => '', 'network_primary_ipv6' => '',
'network_primary_ipv6_prefix' => '', 'network_primary_ipv6_prefix' => '',
'network_primary_ipv6_gateway' => '', 'network_primary_ipv6_gateway' => '',
'network_primary_ipv6_vlan' => '',
'network_primary_ipv6_dns1' => '', 'network_primary_ipv6_dns1' => '',
'network_primary_ipv6_dns2' => '', 'network_primary_ipv6_dns2' => '',
], ],
@ -31,7 +30,6 @@ $defaults = [
'network_secondary_ipv6' => '', 'network_secondary_ipv6' => '',
'network_secondary_ipv6_prefix' => '', 'network_secondary_ipv6_prefix' => '',
'network_secondary_ipv6_gateway' => '', 'network_secondary_ipv6_gateway' => '',
'network_secondary_ipv6_vlan' => '',
'network_secondary_ipv6_dns1' => '', 'network_secondary_ipv6_dns1' => '',
'network_secondary_ipv6_dns2' => '', 'network_secondary_ipv6_dns2' => '',
], ],
@ -66,7 +64,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$network_primary_ipv6 = $get('network_primary_ipv6'); $network_primary_ipv6 = $get('network_primary_ipv6');
$network_primary_ipv6_prefix = $get('network_primary_ipv6_prefix'); $network_primary_ipv6_prefix = $get('network_primary_ipv6_prefix');
$network_primary_ipv6_gateway = $get('network_primary_ipv6_gateway'); $network_primary_ipv6_gateway = $get('network_primary_ipv6_gateway');
$network_primary_ipv6_vlan = $get('network_primary_ipv6_vlan');
$network_primary_ipv6_dns1 = $get('network_primary_ipv6_dns1'); $network_primary_ipv6_dns1 = $get('network_primary_ipv6_dns1');
$network_primary_ipv6_dns2 = $get('network_primary_ipv6_dns2'); $network_primary_ipv6_dns2 = $get('network_primary_ipv6_dns2');
@ -79,7 +76,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$network_secondary_ipv6 = $get('network_secondary_ipv6'); $network_secondary_ipv6 = $get('network_secondary_ipv6');
$network_secondary_ipv6_prefix = $get('network_secondary_ipv6_prefix'); $network_secondary_ipv6_prefix = $get('network_secondary_ipv6_prefix');
$network_secondary_ipv6_gateway = $get('network_secondary_ipv6_gateway'); $network_secondary_ipv6_gateway = $get('network_secondary_ipv6_gateway');
$network_secondary_ipv6_vlan = $get('network_secondary_ipv6_vlan');
$network_secondary_ipv6_dns1 = $get('network_secondary_ipv6_dns1'); $network_secondary_ipv6_dns1 = $get('network_secondary_ipv6_dns1');
$network_secondary_ipv6_dns2 = $get('network_secondary_ipv6_dns2'); $network_secondary_ipv6_dns2 = $get('network_secondary_ipv6_dns2');
@ -95,7 +91,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
'network_primary_ipv6' => $network_primary_ipv6, 'network_primary_ipv6' => $network_primary_ipv6,
'network_primary_ipv6_prefix' => $network_primary_ipv6_prefix, 'network_primary_ipv6_prefix' => $network_primary_ipv6_prefix,
'network_primary_ipv6_gateway' => $network_primary_ipv6_gateway, 'network_primary_ipv6_gateway' => $network_primary_ipv6_gateway,
'network_primary_ipv6_vlan' => $network_primary_ipv6_vlan,
'network_primary_ipv6_dns1' => $network_primary_ipv6_dns1, 'network_primary_ipv6_dns1' => $network_primary_ipv6_dns1,
'network_primary_ipv6_dns2' => $network_primary_ipv6_dns2 'network_primary_ipv6_dns2' => $network_primary_ipv6_dns2
], ],
@ -110,7 +105,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
'network_secondary_ipv6' => $network_secondary_ipv6, 'network_secondary_ipv6' => $network_secondary_ipv6,
'network_secondary_ipv6_prefix' => $network_secondary_ipv6_prefix, 'network_secondary_ipv6_prefix' => $network_secondary_ipv6_prefix,
'network_secondary_ipv6_gateway' => $network_secondary_ipv6_gateway, 'network_secondary_ipv6_gateway' => $network_secondary_ipv6_gateway,
'network_secondary_ipv6_vlan' => $network_secondary_ipv6_vlan,
'network_secondary_ipv6_dns1' => $network_secondary_ipv6_dns1, 'network_secondary_ipv6_dns1' => $network_secondary_ipv6_dns1,
'network_secondary_ipv6_dns2' => $network_secondary_ipv6_dns2 'network_secondary_ipv6_dns2' => $network_secondary_ipv6_dns2
], ],
@ -198,10 +192,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<input type="text" id="network_primary_ipv6_gateway" name="network_primary_ipv6_gateway" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['network_primary_ipv6_gateway']); ?>"> <input type="text" id="network_primary_ipv6_gateway" name="network_primary_ipv6_gateway" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['network_primary_ipv6_gateway']); ?>">
<label for="network_primary_ipv6_gateway">Gateway</label> <label for="network_primary_ipv6_gateway">Gateway</label>
</div> </div>
<div class="input-group">
<input type="number" min="1" max="4094" id="network_primary_ipv6_vlan" name="network_primary_ipv6_vlan" placeholder="Vlan" value="<?php echo htmlspecialchars($data['primary']['network_primary_ipv6_vlan']); ?>">
<label for="network_primary_ipv6_vlan">Vlan</label>
</div>
<div class="input-group"> <div class="input-group">
<input type="text" id="network_primary_ipv6_dns1" name="network_primary_ipv6_dns1" placeholder="2606:4700:4700::1111" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['network_primary_ipv6_dns1']); ?>"> <input type="text" id="network_primary_ipv6_dns1" name="network_primary_ipv6_dns1" placeholder="2606:4700:4700::1111" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['network_primary_ipv6_dns1']); ?>">
<label for="network_primary_ipv6_dns1">DNS1</label> <label for="network_primary_ipv6_dns1">DNS1</label>
@ -276,10 +266,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<input type="text" id="network_secondary_ipv6_gateway" name="network_secondary_ipv6_gateway" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['secondary']['network_secondary_ipv6_gateway']); ?>"> <input type="text" id="network_secondary_ipv6_gateway" name="network_secondary_ipv6_gateway" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['secondary']['network_secondary_ipv6_gateway']); ?>">
<label for="network_secondary_ipv6_gateway">Gateway</label> <label for="network_secondary_ipv6_gateway">Gateway</label>
</div> </div>
<div class="input-group">
<input type="number" min="1" max="4094" id="network_secondary_ipv6_vlan" name="network_secondary_ipv6_vlan" placeholder="Vlan" value="<?php echo htmlspecialchars($data['secondary']['network_secondary_ipv6_vlan']); ?>">
<label for="network_secondary_ipv6_vlan">Vlan</label>
</div>
<div class="input-group"> <div class="input-group">
<input type="text" id="network_secondary_ipv6_dns1" name="network_secondary_ipv6_dns1" placeholder="2606:4700:4700::1111" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['secondary']['network_secondary_ipv6_dns1']); ?>"> <input type="text" id="network_secondary_ipv6_dns1" name="network_secondary_ipv6_dns1" placeholder="2606:4700:4700::1111" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['secondary']['network_secondary_ipv6_dns1']); ?>">
<label for="network_secondary_ipv6_dns1">DNS1</label> <label for="network_secondary_ipv6_dns1">DNS1</label>

View File

@ -957,86 +957,6 @@ function update_service($which_service)
function update_firewall() {} function update_firewall() {}
function update_network()
{
$ethInterfaces = [];
$jsonFile = __DIR__ . '/network.json';
$ethInterface = "";
foreach (scandir('/sys/class/net') as $iface) {
if ($iface === '.' || $iface === '..' || $iface === 'lo') {
continue;
}
$base = "/sys/class/net/$iface";
// Must be physical hardware
if (!is_dir("$base/device")) {
continue;
}
// Exclude wireless
if (is_dir("$base/wireless")) {
continue;
}
// Must be Ethernet
$type = @file_get_contents("$base/type");
if (trim($type) !== '1') {
continue;
}
$ethInterfaces[] = $iface;
}
$ethInterfaces
? $ethInterface = $ethInterfaces[0]
: 'No physical wired Ethernet NIC found';
if ($ethInterface != "") {
$defaults = [
'primary' => [
'mode' => 'dhcp',
'modev6' => 'auto',
'network_primary_ip' => '',
'network_primary_subnet' => '',
'network_primary_gateway' => '',
'network_primary_vlan' => '',
'network_primary_dns1' => '',
'network_primary_dns2' => '',
'network_primary_ipv6' => '',
'network_primary_ipv6_prefix' => '',
'network_primary_ipv6_gateway' => '',
'network_primary_ipv6_vlan' => '',
'network_primary_ipv6_dns1' => '',
'network_primary_ipv6_dns2' => '',
],
'secondary' => [
'mode' => 'disabled',
'modev6' => 'disabled',
'network_secondary_ip' => '',
'network_secondary_gateway' => '',
'network_secondary_vlan' => '',
'network_secondary_dns1' => '',
'network_secondary_dns2' => '',
'network_secondary_ipv6' => '',
'network_secondary_ipv6_prefix' => '',
'network_secondary_ipv6_gateway' => '',
'network_secondary_ipv6_vlan' => '',
'network_secondary_ipv6_dns1' => '',
'network_secondary_ipv6_dns2' => '',
],
'firewall' => 'disable',
'ips' => ['', '', '', '', '']
];
if (file_exists($jsonFile)) {
$raw = file_get_contents($jsonFile);
$data = json_decode($raw, true);
}
}
}
function update_firmware() {} function update_firmware() {}
function update_service_backend($service) function update_service_backend($service)