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

Implement connectioncontextkernel/ipcontext/neighbor #36

Open
edwarnicke opened this issue Dec 2, 2020 · 0 comments
Open

Implement connectioncontextkernel/ipcontext/neighbor #36

edwarnicke opened this issue Dec 2, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@edwarnicke
Copy link
Member

The Connection.ConnectionContext.IPContext.IPNeigbors allows the NSE to specify IPNeighbors associating an IP address to a hardware address that should be configured.

Because manipulating the ethernet address on kernel interfaces requires privilege, and the presumption is that the Forwarder may be the only privileged entity involved in the connection, it falls to the Forwarder in the case of kernel mechanisms to setup those kernel IP Neighbors in the NetNS of the Client/NSE if kernel mechanism is used.

This is in direct analogy to the already existing connectioncontextkernel/ipcontext/ipaddress.

Helpful notes for implementation:

  1. netlink.NeighAdd can be used to set create neighbors, and netlink.NeighDel can be used to delete them on Close of the Connection.
  2. It is likely a good idea to add a helper to api for extracting net.HardwareAddr from IPNeighbor, similar to func (n *IpNeighbor) GetIP() net.IP
  3. Once implemented, please add to the connectioncontextkernel/client.go and connectioncontextkernel/server.go.

Running end to end can be done using cmd-forwarder-vpp.

@edwarnicke edwarnicke added the good first issue Good for newcomers label Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant