Skip to content

Modify driver Join api to only allow dst prefix#193

Merged
mavenugo merged 1 commit intomoby:masterfrom
mrjana:cnm
May 21, 2015
Merged

Modify driver Join api to only allow dst prefix#193
mavenugo merged 1 commit intomoby:masterfrom
mrjana:cnm

Conversation

@mrjana
Copy link
Copy Markdown
Contributor

@mrjana mrjana commented May 21, 2015

Currently the driver api allows the driver to specify the
full interface name for the interface inside the container.
This is not appropriate since the driver does not have the full
view of the sandbox to correcly allocate an unambiguous interface
name. Instead with this PR the driver will be allowed to specify
a prefix for the name and libnetwork and sandbox layers will
disambiguate it with an appropriate suffix.

Signed-off-by: Jana Radhakrishnan mrjana@docker.com

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since you are not using suffix anywhere else, have you considered:

i.DstName = fmt.Sprintf("%s%d", i.DstName, n.nextIfIndex)

If you think it is cleaner as it is now, it's fine too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, what you suggested is better. I will push new diffs with the changes.

@mrjana
Copy link
Copy Markdown
Contributor Author

mrjana commented May 21, 2015

@aboch updated with new diffs and rebase

@aboch
Copy link
Copy Markdown
Contributor

aboch commented May 21, 2015

LGTM

Currently the driver api allows the driver to specify the
full interface name for the interface inside the container.
This is not appropriate since the driver does not have the full
view of the sandbox to correcly allocate an unambiguous interface
name. Instead with this PR the driver will be allowed to specify
a prefix for the name and libnetwork and sandbox layers will
disambiguate it with an appropriate suffix.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
@mavenugo
Copy link
Copy Markdown
Contributor

LGTM

mavenugo added a commit that referenced this pull request May 21, 2015
Modify driver Join api to only allow dst prefix
@mavenugo mavenugo merged commit bc56eb5 into moby:master May 21, 2015
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.

3 participants