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

When "--no-local-port" is used, the last port cannot be used #7

Closed
YuvalAdler opened this issue Jan 3, 2013 · 1 comment
Closed

Comments

@YuvalAdler
Copy link
Contributor

In dp_ports.c, dp_ports_lookup() function should be updated for the case of no local port.

struct sw_port *
dp_ports_lookup(struct datapath *dp, uint32_t port_no)
{
// exclude local port from ports_num
uint32_t ports_num = dp->local_port ? dp->ports_num -1 : dp->ports_num;

if (port_no == OFPP_LOCAL) {
    return dp->local_port;
}

if (port_no < 1 || port_no > ports_num) {
    return NULL;
}

return &dp->ports[port_no];

}

@ederlf
Copy link
Collaborator

ederlf commented Jan 5, 2013

Fixed.
Thank you.

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

No branches or pull requests

2 participants