12 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
Mike Steinmetz
edb9a43a89 MM-5521 escape inputs for some error messages 2020-04-23 15:19:44 +02:00
Jamie Cameron
2a18415aee Deal with interface names like en3s5 https://sourceforge.net/p/webadmin/bugs/5164/ 2018-07-25 23:14:41 -07:00
Jamie Cameron
14fe278102 Handle interface names like enp4s7 https://github.com/webmin/webmin/issues/803 2018-02-08 16:22:14 -08:00
Jamie Cameron
abd79b1ca7 Handle case where broadcast field can't be edited 2012-05-24 21:43:13 -07:00
Jamie Cameron
ca93c866ed Set address before checking for clash 2011-10-21 15:44:47 -07:00
Jamie Cameron
b165df867e More bridge support 2011-06-28 10:57:12 -07:00
Jamie Cameron
52e02d51d3 More work on Solaris support for IPv6 2011-01-20 22:00:11 -08:00
Jamie Cameron
ab6f2f9586 IPv6 address management for active interfaces 2011-01-18 21:42:45 -08: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