Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf/init.sh: More robust deletion of routes. #719

Merged
merged 1 commit into from
May 15, 2017
Merged

Conversation

jrajahalme
Copy link
Member

Remove the 'dev' and 'via' options from route deletion commands, so
that routes will be deleted regardless of what 'dev' or 'via'
configuration they have. Without this change it is possible for a
conflicting route to exist which will not get removed and then the
following route add fails due to conflicting route already existing.

In the specific instance triggering this change there was a
conflicting route:

10.11.0.1 dev enp0s8 scope link

Which was not removed by:

$ ip route del 10.11.0.1/32 dev cilium_host

so that the following route add failed:

$ ip route add 10.11.0.1/32 dev cilium_host
RTNETLINK answers: File exists

Signed-off-by: Jarno Rajahalme jarno@covalent.io

Remove the 'dev' and 'via' options from route deletion commands, so
that routes will be deleted regardless of what 'dev' or 'via'
configuration they have.  Without this change it is possible for a
conflicting route to exist which will not get removed and then the
following route add fails due to conflicting route already existing.

In the specific instance triggering this change there was a
conflicting route:

    10.11.0.1 dev enp0s8 scope link

Which was not removed by:

    $ ip route del 10.11.0.1/32 dev cilium_host

so that the following route add failed:

    $ ip route add 10.11.0.1/32 dev cilium_host
    RTNETLINK answers: File exists

Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
@jrajahalme jrajahalme requested a review from tgraf May 15, 2017 19:10
@jrajahalme jrajahalme merged commit 35303e2 into master May 15, 2017
@jrajahalme jrajahalme deleted the bpf-init-sh-fix branch May 15, 2017 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants