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

routing: fix support for default gateway #272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChrisMuc
Copy link

@ChrisMuc ChrisMuc commented Sep 16, 2021

Issues #147 and #240 complain about a non working default gateway feature. I had the same issue and tried to find solutions.

Routes with a netmask of /1 or larger are working, wheres routes with a netmask of /0 are accepted but not used when it comes to selecting the next hop.

  • Option A: Use separate routes with a netmask of "/1" or larger.
    e.g. 0.0.0.0/1 and 128.0.0.0/1
  • Option B: Fix the code
    The proposed fix initializes nh (i.e. next hop) with tree->root->data[0] (i.e. mtrie leaf for 0.0.0.0) and resets this to NULL, if this is not a gateway (i.e. OFP_RTL_FLAGS_GATEWAY not set).
    This way, if (elem->masklen == 0) return nh; will return the default gateway instead of NULL.

@bogdanPricope
Copy link
Contributor

Hi @ChrisMuc,

Sorry to bring the bad news but there are no active maintainers for this repo. Both Nokia and Enea have lost interest and stopped contributing. There is no one to review and merge the fixes.

The 'default route' functionality is missing and I plan to implement it at some point in my own version of OFP.
Out of curiosity, what are you trying to achieve with OFP and what other features would you like to see in OFP?

Best regards,
Bogdan

cjsworld added a commit to cjsworld/ofp that referenced this pull request Nov 25, 2022
cjsworld added a commit to cjsworld/ofp that referenced this pull request Nov 25, 2022
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