Skip to content

[config]: Flush the neighbor table when removing the router interface#606

Merged
stcheng merged 1 commit intosonic-net:masterfrom
stcheng:flush
Oct 29, 2019
Merged

[config]: Flush the neighbor table when removing the router interface#606
stcheng merged 1 commit intosonic-net:masterfrom
stcheng:flush

Conversation

@stcheng
Copy link
Contributor

@stcheng stcheng commented Aug 14, 2019

Manually trigger the flush command to remove the deprecated
neighbors that are associated with the removed router interface.

Signed-off-by: Shu0T1an ChenG [email protected]

Manually trigger the flush command to remove the deprecated
neighbors that are associated with the removed router interface.

Signed-off-by: Shu0T1an ChenG <[email protected]>
@stcheng
Copy link
Contributor Author

stcheng commented Aug 19, 2019

retest this please

@lguohan lguohan requested a review from prsunny October 15, 2019 19:28
@lguohan
Copy link
Contributor

lguohan commented Oct 15, 2019

might be related if we remove the ip interface.

@stcheng stcheng merged commit 0f476a7 into sonic-net:master Oct 29, 2019
@stcheng stcheng deleted the flush branch October 29, 2019 18:05
saiarcot895 added a commit to saiarcot895/sonic-utilities that referenced this pull request Apr 22, 2024
In the test_po_update test case, one of the things done there is to
remove an IP address from a port channel interface. As part of that, the
current handling for that issues a `ip neigh flush dev ...` command,
added in sonic-net#606, presumably to remove old
neighbor entries that would no longer be valid. I would think that
the kernel would automatically do this, but maybe it didn't back then;
I'm not sure if there's been a behavior change here since then.

In some cases, this command is returning an error, saying "Failed to
send flush request: No such file or directory". I'm not sure why this
is; maybe when iproute2 is going through the list of neighbors, some
neighbor entry was there, but then by the time it issued the deletion
request, that neighbor entry was removed by the kernel since the IP
address was removed. Either way, I don't believe a failure here is
critical.

Therefore, ignore any failures from running this command.

Signed-off-by: Saikrishna Arcot <[email protected]>
saiarcot895 added a commit that referenced this pull request Apr 29, 2024
#3281)

* Ignore any error returned from `ip neigh flush`

In the test_po_update test case, one of the things done there is to
remove an IP address from a port channel interface. As part of that, the
current handling for that issues a `ip neigh flush dev ...` command,
added in #606, presumably to remove old
neighbor entries that would no longer be valid. I would think that
the kernel would automatically do this, but maybe it didn't back then;
I'm not sure if there's been a behavior change here since then.

In some cases, this command is returning an error, saying "Failed to
send flush request: No such file or directory". I'm not sure why this
is; maybe when iproute2 is going through the list of neighbors, some
neighbor entry was there, but then by the time it issued the deletion
request, that neighbor entry was removed by the kernel since the IP
address was removed. Either way, I don't believe a failure here is
critical.

Therefore, ignore any failures from running this command.

Signed-off-by: Saikrishna Arcot <[email protected]>

* Move the IP neighbor flush to be before the IP address removal

This should make sure that the IP neighbor flush should always work.
This also requires the tests to be updated, to mock out the flush
command call since that interface won't exist.

Signed-off-by: Saikrishna Arcot <[email protected]>

---------

Signed-off-by: Saikrishna Arcot <[email protected]>
arfeigin pushed a commit to arfeigin/sonic-utilities that referenced this pull request Jun 16, 2024
sonic-net#3281)

* Ignore any error returned from `ip neigh flush`

In the test_po_update test case, one of the things done there is to
remove an IP address from a port channel interface. As part of that, the
current handling for that issues a `ip neigh flush dev ...` command,
added in sonic-net#606, presumably to remove old
neighbor entries that would no longer be valid. I would think that
the kernel would automatically do this, but maybe it didn't back then;
I'm not sure if there's been a behavior change here since then.

In some cases, this command is returning an error, saying "Failed to
send flush request: No such file or directory". I'm not sure why this
is; maybe when iproute2 is going through the list of neighbors, some
neighbor entry was there, but then by the time it issued the deletion
request, that neighbor entry was removed by the kernel since the IP
address was removed. Either way, I don't believe a failure here is
critical.

Therefore, ignore any failures from running this command.

Signed-off-by: Saikrishna Arcot <[email protected]>

* Move the IP neighbor flush to be before the IP address removal

This should make sure that the IP neighbor flush should always work.
This also requires the tests to be updated, to mock out the flush
command call since that interface won't exist.

Signed-off-by: Saikrishna Arcot <[email protected]>

---------

Signed-off-by: Saikrishna Arcot <[email protected]>
nmoray pushed a commit to nmoray/sonic-utilities that referenced this pull request Jun 25, 2025
sonic-net#3281)

* Ignore any error returned from `ip neigh flush`

In the test_po_update test case, one of the things done there is to
remove an IP address from a port channel interface. As part of that, the
current handling for that issues a `ip neigh flush dev ...` command,
added in sonic-net#606, presumably to remove old
neighbor entries that would no longer be valid. I would think that
the kernel would automatically do this, but maybe it didn't back then;
I'm not sure if there's been a behavior change here since then.

In some cases, this command is returning an error, saying "Failed to
send flush request: No such file or directory". I'm not sure why this
is; maybe when iproute2 is going through the list of neighbors, some
neighbor entry was there, but then by the time it issued the deletion
request, that neighbor entry was removed by the kernel since the IP
address was removed. Either way, I don't believe a failure here is
critical.

Therefore, ignore any failures from running this command.

Signed-off-by: Saikrishna Arcot <[email protected]>

* Move the IP neighbor flush to be before the IP address removal

This should make sure that the IP neighbor flush should always work.
This also requires the tests to be updated, to mock out the flush
command call since that interface won't exist.

Signed-off-by: Saikrishna Arcot <[email protected]>

---------

Signed-off-by: Saikrishna Arcot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants