mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
network: add missing link->network checks
When the function is called, no network file may be assigned to the link.
This commit is contained in:
parent
69cebea78a
commit
b1b0b42e48
@ -2393,9 +2393,9 @@ static int link_drop_foreign_config(Link *link) {
|
||||
continue;
|
||||
|
||||
if (link_address_is_dynamic(link, address)) {
|
||||
if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP))
|
||||
if (link->network && FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP))
|
||||
continue;
|
||||
} else if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC))
|
||||
} else if (link->network && FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC))
|
||||
continue;
|
||||
|
||||
if (link_is_static_address_configured(link, address)) {
|
||||
@ -2435,11 +2435,11 @@ static int link_drop_foreign_config(Link *link) {
|
||||
in_addr_equal(AF_INET6, &route->dst, &(union in_addr_union) { .in6 = {{{ 0xff,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 }}} }))
|
||||
continue;
|
||||
|
||||
if (route->protocol == RTPROT_STATIC &&
|
||||
if (route->protocol == RTPROT_STATIC && link->network &&
|
||||
FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC))
|
||||
continue;
|
||||
|
||||
if (route->protocol == RTPROT_DHCP &&
|
||||
if (route->protocol == RTPROT_DHCP && link->network &&
|
||||
FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP))
|
||||
continue;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user