16 Commits

Author SHA1 Message Date
Ilia Ross
cb4a322042 Fix active virtual interface handling
ⓘ Treat Linux active virtual interfaces as secondary IP addresses instead of independent links, fixing alias parsing, hiding invalid status controls, rejecting down-state creation, and removing existing aliases with ip addr del when needed.

Reproduce path:

Example repro before this fix:

1. Go to **Network Configuration → Network Interfaces → Active Now**.
2. Click **Add a new interface**.
3. Enter:

```text
Name: enp0s5:1
IPv4 address: 10.211.55.21
Netmask: 255.255.255.0
Status: Down
```

4. Click **Create**.

Before the fix, Webmin could still create the alias or handle it inconsistently, because `enp0s5:1` is not a real link that can be “down”. It is just an extra IP address on `enp0s5`.

Expected after the fix:

- The UI should not offer `Status` for active virtual aliases.
- If someone submits `up=0` manually anyway, Webmin rejects it with:
  `Virtual interfaces cannot be created with down status`
- If an existing active virtual alias is saved as down through lower-level code, Webmin removes the IP using something like:

```bash
ip addr del 10.211.55.21/24 dev enp0s5
```
2026-06-20 15:23:09 +02:00
iliajie
8e47199147 Fix to consider active interface using new ui_element_inline API 2023-07-15 23:28:57 +03:00
Jamie Cameron
1e8b03bfbd No need for net:: module 2020-02-03 18:20:01 -08:00
Jamie Cameron
10f7d1f304 Adding new virtual interfaces makes no sense for new real interfaces https://www.virtualmin.com/node/58599 2018-09-07 21:56:08 -07:00
Jamie Cameron
b165df867e More bridge support 2011-06-28 10:57:12 -07:00
Jamie Cameron
9f51a78df1 Fixes for bridge support 2011-06-27 20:54:41 -07:00
Jamie Cameron
10c9d5fe89 Show interface status on linux 2011-05-04 14:46:03 -07:00
Jamie Cameron
a23d63ccd1 More work on Solaris IPv6 support 2011-01-21 17:01:03 -08:00
Jamie Cameron
52e02d51d3 More work on Solaris support for IPv6 2011-01-20 22:00:11 -08:00
Jamie Cameron
e329e2991d Debian boot-time IPv6 interface editing now working 2011-01-19 17:02:13 -08:00
Jamie Cameron
ab6f2f9586 IPv6 address management for active interfaces 2011-01-18 21:42:45 -08:00
Jamie Cameron
a9d5c6e244 Start of work on IPv6 support 2011-01-15 11:45:40 -08:00
Jamie Cameron
1c6b3227bd ui-lib conversion of active interfaces page 2008-08-19 23:50:28 +00:00
Jamie Cameron
c46ab04bff IPv6 support on Debian 2008-06-18 20:43:23 +00:00
Jamie Cameron
86b2133e9f Added support for comments on interfaces 2007-11-16 23:21:33 +00:00
Jamie Cameron
fc1c1b243f Initial checkin of Webmin 2007-04-12 20:24:50 +00:00