mirror of
https://github.com/opnsense/core.git
synced 2026-12-04 01:18:36 +00:00
Interfaces: remove "up" flag from unconditional actions when the assignment isn't configured, this should fix https://github.com/opnsense/core/issues/11057 and https://github.com/opnsense/core/issues/10529
This commit is contained in:
1 parent
317c831d44
commit
9473c8a62a
1 file changed
+6
-1
@@ -2406,7 +2406,12 @@ function interface_configure($verbose = false, $interface = 'wan', $reload = fal
|
||||
* 3. Set "up" flag for UP/RUNNING requirement, adding an address
|
||||
* already does that so at this point try to be more consistent.
|
||||
*/
|
||||
mwexecf('/sbin/ifconfig %s inet6 -accept_rtadv description %s up', [$device, $ifdescr]);
|
||||
if (empty($wancfg['ipaddrv6']) && empty($wancfg['ipaddr'])) {
|
||||
/* skip "up" flag when unconfigured, prevents interfaces like wireguard from flapping when reconfigured and down */
|
||||
mwexecf('/sbin/ifconfig %s inet6 -accept_rtadv description %s', [$device, $ifdescr]);
|
||||
} else {
|
||||
mwexecf('/sbin/ifconfig %s inet6 -accept_rtadv description %s up', [$device, $ifdescr]);
|
||||
}
|
||||
|
||||
switch (is_ipv6_allowed() ? ($wancfg['ipaddrv6'] ?? 'none') : 'none') {
|
||||
case 'slaac':
|
||||
|
||||
Reference in new issue
Block a user