network/neighbor: skip to request neighbors with unmatching link layer address length
This commit is contained in:
@@ -256,6 +256,16 @@ static int link_request_neighbor(Link *link, const Neighbor *neighbor) {
|
||||
assert(neighbor);
|
||||
assert(neighbor->source != NETWORK_CONFIG_SOURCE_FOREIGN);
|
||||
|
||||
if (neighbor->ll_addr.length != link->hw_addr.length) {
|
||||
log_link_debug(link,
|
||||
"The link layer address lenght (%zu) for neighbor %s does not match with "
|
||||
"the hardware address length (%zu), ignoring the setting.",
|
||||
neighbor->ll_addr.length,
|
||||
IN_ADDR_TO_STRING(neighbor->family, &neighbor->in_addr),
|
||||
link->hw_addr.length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (neighbor_get(link, neighbor, &existing) < 0) {
|
||||
_cleanup_(neighbor_freep) Neighbor *tmp = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user