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

Feature/custom faux mac prefix #329

Merged

Conversation

henry54809
Copy link
Collaborator

No description provided.

@henry54809 henry54809 requested a review from grafnu July 13, 2021 17:04
.github/workflows/main.yaml Outdated Show resolved Hide resolved
bin/run_test_set Outdated Show resolved Hide resolved
etc/start_faux Show resolved Hide resolved
testing/test_fot Outdated Show resolved Hide resolved
@grafnu
Copy link
Collaborator

grafnu commented Jul 13, 2021 via email

@henry54809
Copy link
Collaborator Author

PTAL

@@ -153,6 +153,10 @@ if [[ -z $vxlan ]]; then
docker exec $CONTAINER ip link set data0 up
fi

if [ $CLEAN_MAC_PREFIX != "$DEFAULT_CLEAN_MAC_PREFIX" ]; then
docker exec $CONTAINER /root/bin/rename_site_config $CLEAN_MAC_PREFIX
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should go inside controller_go -- basically just pass the CLEAN_MAC_PREFIX in (as per the docker_envs use above), and then inside of the controller sort out what to do about it. Generally better to avoid the "docker exec" solution because it's a lot harder to debug/diagnose/trace -- the only reason it's done for the data0 interface is because it has to be done externally after the container is created (effective race condition).

source bin/stack_functions
set_faux_mac_prefix

intf_mac=$FAUX_MAC_PREFIX:8f:00
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if FAUX_MAC_PREFIX is not defined? Doesn't this need a default somewhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_faux_mac_prefix defines the default

@henry54809 henry54809 merged commit 2ffdfc2 into faucetsdn:master Jul 15, 2021
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.

2 participants