mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-19 20:40:41 +02:00
n-acd: fix handling of N_ACD_E_DROPPED
N_ACD_E_DROPPED is an error code of n-acd, albeit internal. But such codes are returned as postive values, unlike error codes from errno.h (which are negative). Fix comparing for N_ACD_E_DROPPED, otherwise the error gets propagate to the caller when we should handle it internally.
This commit is contained in:
parent
e989cbbd99
commit
6837095aab
1 changed files with 4 additions and 4 deletions
|
|
@ -420,7 +420,7 @@ int n_acd_probe_handle_timeout(NAcdProbe *probe) {
|
|||
|
||||
r = n_acd_send(probe->acd, &probe->ip, NULL);
|
||||
if (r) {
|
||||
if (r != -N_ACD_E_DROPPED)
|
||||
if (r != N_ACD_E_DROPPED)
|
||||
return r;
|
||||
|
||||
/*
|
||||
|
|
@ -475,7 +475,7 @@ int n_acd_probe_handle_timeout(NAcdProbe *probe) {
|
|||
|
||||
r = n_acd_send(probe->acd, &probe->ip, &probe->ip);
|
||||
if (r) {
|
||||
if (r != -N_ACD_E_DROPPED)
|
||||
if (r != N_ACD_E_DROPPED)
|
||||
return r;
|
||||
|
||||
/*
|
||||
|
|
@ -595,7 +595,7 @@ int n_acd_probe_handle_packet(NAcdProbe *probe, struct ether_arp *packet, bool h
|
|||
if (!rate_limited) {
|
||||
r = n_acd_send(probe->acd, &probe->ip, &probe->ip);
|
||||
if (r) {
|
||||
if (r != -N_ACD_E_DROPPED)
|
||||
if (r != N_ACD_E_DROPPED)
|
||||
return r;
|
||||
|
||||
if (probe->defend == N_ACD_DEFEND_ONCE) {
|
||||
|
|
@ -604,7 +604,7 @@ int n_acd_probe_handle_packet(NAcdProbe *probe, struct ether_arp *packet, bool h
|
|||
}
|
||||
}
|
||||
|
||||
if (r != -N_ACD_E_DROPPED)
|
||||
if (r != N_ACD_E_DROPPED)
|
||||
probe->last_defend = now;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue