Compare commits

...

4 Commits

Author SHA1 Message Date
Yu Watanabe c253a95bca
Merge pull request #16379 from yuwata/network-dhcp6-delegated-prefix-address-handler
network: fix assertion in assigning dhcp6 delegated prefix
2020-07-08 10:22:08 +09:00
Lukas Nykryn 21d19a7a13 docs: update information where to file bugs against RHEL/CentOS versions of systemd 2020-07-07 23:12:51 +02:00
Yu Watanabe 3650173fec network: make address_handler() static 2020-07-07 19:48:38 +02:00
Yu Watanabe a211ff4b84 network: introduce own address handler for dhcp6 delegated prefix
Fixes #16365.
2020-07-07 19:48:26 +02:00
4 changed files with 28 additions and 6 deletions

View File

@ -20,7 +20,7 @@ Following these guidelines makes it easier for us to process your issue, and ens
### Older downstream versions
For older versions that are still supported by your distribution please use respective downstream tracker:
* **Fedora** - [bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=systemd)
* **RHEL-7/CentOS-7** - [bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%207&component=systemd) or [systemd-rhel github](https://github.com/lnykryn/systemd-rhel/issues)
* **RHEL/CentOS** - [bugzilla](https://bugzilla.redhat.com/) or [systemd-rhel github](https://github.com/systemd-rhel/)
* **Debian** - [bugs.debian.org](https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=systemd)
## Security vulnerability reports

View File

@ -998,6 +998,31 @@ static int dhcp6_prefix_remove_all(Manager *m, Link *link) {
return 0;
}
static int dhcp6_assign_delegeted_prefix_address_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
int r;
assert(link);
if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
return 1;
r = sd_netlink_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
log_link_message_warning_errno(link, m, r, "Could not set DHCPv6 delegated prefix address ");
link_enter_failed(link);
return 1;
} else if (r >= 0)
(void) manager_rtnl_process_address(rtnl, m, link->manager);
r = link_request_set_routes(link);
if (r < 0) {
link_enter_failed(link);
return 1;
}
return 1;
}
static int dhcp6_assign_delegated_prefix(Link *link,
const struct in6_addr *prefix,
uint8_t prefix_len,
@ -1035,11 +1060,9 @@ static int dhcp6_assign_delegated_prefix(Link *link,
link_set_state(link, LINK_STATE_CONFIGURING);
r = address_configure(address, link, address_handler, true);
r = address_configure(address, link, dhcp6_assign_delegeted_prefix_address_handler, true);
if (r < 0)
return log_link_warning_errno(link, r, "Failed to set acquired DHCPv6 delegated prefix address: %m");
if (r > 0)
link->address_messages++;
return 0;
}

View File

@ -1184,7 +1184,7 @@ static int link_request_set_neighbors(Link *link) {
return 0;
}
int address_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
static int address_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
int r;
assert(rtnl);

View File

@ -220,7 +220,6 @@ int link_request_set_routes(Link *link);
int link_request_set_nexthop(Link *link);
int link_reconfigure(Link *link, bool force);
int address_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link);
int log_link_message_full_errno(Link *link, sd_netlink_message *m, int level, int err, const char *msg);
#define log_link_message_error_errno(link, m, err, msg) log_link_message_full_errno(link, m, LOG_ERR, err, msg)