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/ethernetcontext/macaddress #32

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

Implement connectioncontextkernel/ethernetcontext/macaddress #32

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

Comments

@edwarnicke
Copy link
Member

edwarnicke commented Dec 2, 2020

The Connection.ConnnectionContext.EthernetContext allows the NSE to specify the Source and Dest Mac address.

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 Source and Dest Mac addresses.

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

Helpful notes for implementation:

  1. netlink.LinkSetHardwareAddr can be used to set the Hardware address on the interface.
  2. Make sure to use a netlink.Handle for the NetNS of the Client/NSE. This can be created using mechutils.ToNetlinkHandle. Example of use
  3. The netlink.Link on which you need to set the mac address can be retrieved using:
    handle.LinkByName(mechutils.ToInterfaceName(conn, isClient))
    
    Example of use
  4. 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
nsmbot pushed a commit that referenced this issue Mar 12, 2024
…vpp@main

PR link: https://github.com/networkservicemesh/govpp/pull/

Commit: 3c0a753
Author: Denis Tingaikin
Date: 2024-03-12 19:56:07 +0300
Message:
  - Merge pull request #32 from networkservicemesh/fix-update-workflow
Signed-off-by: NSMBot <[email protected]>
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