mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
Merge pull request #21533 from yuwata/network-trivial-follow-ups
network: trivial follow-ups
This commit is contained in:
commit
f5caacec1c
@ -543,9 +543,9 @@ static bool link_is_ready_to_call_set_link(Request *req) {
|
||||
break;
|
||||
case SET_LINK_MAC:
|
||||
if (req->netlink_handler == link_set_mac_handler) {
|
||||
/* This is the second trial to set hardware address. On the first attempt
|
||||
/* This is the second attempt to set hardware address. On the first attempt
|
||||
* req->netlink_handler points to link_set_mac_allow_retry_handler().
|
||||
* The first trial failed as the interface was up. */
|
||||
* The first attempt failed as the interface was up. */
|
||||
r = link_down(link);
|
||||
if (r < 0) {
|
||||
link_enter_failed(link);
|
||||
|
@ -148,14 +148,14 @@ int net_verify_hardware_address(
|
||||
|
||||
if (ether_addr_is_multicast(&new_hw_addr->ether)) {
|
||||
if (warn_invalid)
|
||||
log_link_warning(&link, "Specified MAC address has multicast bit set, clearing the bit.");
|
||||
log_link_warning(&link, "Specified MAC address has the multicast bit set, clearing the bit.");
|
||||
|
||||
new_hw_addr->bytes[0] &= 0xfe;
|
||||
}
|
||||
|
||||
if (!ether_addr_is_local(&new_hw_addr->ether)) {
|
||||
if (warn_invalid)
|
||||
log_link_warning(&link, "Specified MAC address has not local assignment bit set, setting the bit.");
|
||||
log_link_warning(&link, "Specified MAC address does not have the local assignment bit set, setting the bit.");
|
||||
|
||||
new_hw_addr->bytes[0] |= 0x02;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user