Skip to content

cilium: encryption cleanup encryption and fix table assignment of nexthop route#8322

Merged
tgraf merged 6 commits intomasterfrom
r-dflt-ip6
Jun 24, 2019
Merged

cilium: encryption cleanup encryption and fix table assignment of nexthop route#8322
tgraf merged 6 commits intomasterfrom
r-dflt-ip6

Conversation

@jrfastab
Copy link
Copy Markdown
Contributor

@jrfastab jrfastab commented Jun 17, 2019

Series of cleanup to encryption code and removes nexthop specifier from out encryption route. Its not needed and will break encryption after PR #8312 by forcing ingress esp traffic to cilium_host when we expect to decrypt it first.

@tgraf says, "The nexthop route was injected into the default table instead of the table
specified. This code path was not used so far, this is a fix for a potential
future usage."

This change is Reviewable

@jrfastab jrfastab requested a review from a team June 17, 2019 16:33
@jrfastab jrfastab self-assigned this Jun 17, 2019
@jrfastab jrfastab added the wip label Jun 17, 2019
@jrfastab
Copy link
Copy Markdown
Contributor Author

test-me-please

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 17, 2019

Coverage Status

Coverage increased (+0.01%) to 44.473% when pulling ad53601 on r-dflt-ip6 into 78b4ea0 on master.

@jrfastab
Copy link
Copy Markdown
Contributor Author

test-me-please

@jrfastab
Copy link
Copy Markdown
Contributor Author

test-me-please

jrfastab and others added 6 commits June 23, 2019 23:28
Remove encryptNode rules from generic EnableIPsec path its already
setup through a call to encryptNode(). This is just duplicate code
that did not get removed.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Remove this comment that is actually old code that is no longer
needed.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
hostRules() is already called above for both ipv4 and ipv6 no need
to call it again.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
While reading and IPv4 and IPv6 code its helpful if we use the same
variable names in both versions. Convert IPv6 code to use 'exactMask'
name to align with IPv4.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
We don't require a nexthop entry here. In fact if we add a nexthop
entry it will be an exact match entry with a more specific route
than the local route that should be taken. To date this didn't matter
because the entry was added to the default table due to a bug in
the route logic that did not specify the table for nexthop entries.
This way it did not conflict with the local rule in the encrypt table.

However, this patch is needed so we can fixup the route entry to
specify table for the nexthop.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
The nexthop route was injected into the default table instead of the table
specified. This code path was not used so far, this is a fix for a potential
future usage.

Fixes: fec5499 ("route: Fix route replacement logic for IPv6")

Signed-off-by: Thomas Graf <thomas@cilium.io>
@jrfastab
Copy link
Copy Markdown
Contributor Author

test-me-please

@jrfastab jrfastab added area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. pending-review and removed wip labels Jun 24, 2019
@jrfastab jrfastab changed the title cilium: encryption, remove dependency on dflt ip6 nexthop cilium: encryption cleanup encryption and fix table assignment of nexthop route Jun 24, 2019
@tgraf tgraf merged commit bd416b0 into master Jun 24, 2019
@tgraf tgraf deleted the r-dflt-ip6 branch June 24, 2019 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants