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

Add LinkIndex to Addr struct #543

Merged
merged 1 commit into from
Jun 3, 2020
Merged

Conversation

brb
Copy link
Contributor

@brb brb commented Jun 2, 2020

Currently, it's cumbersome to get a link by an IP addr - one needs to list all links and then call AddrList() for each of them.

Considering that ifindex is already available to to the parseAddr() helper function, we can expose it to a user via the newly added Addr.LinkIndex field. This makes the retrieving link by IP addr much more simple.

Currently, it's cumbersome to get a link by an IP addr - one needs to
list all links and then call AddrList() for each of them.

Considering that ifindex is already available to to the parseAddr()
helper function, we can expose it to a user via the newly added
Addr.LinkIndex field. This makes the retrieving link by IP addr much
more simple.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
@brb
Copy link
Contributor Author

brb commented Jun 3, 2020

Ping @aboch @jellonek

brb added a commit to cilium/cilium that referenced this pull request Jun 3, 2020
Until vishvananda/netlink#543 has been merged,
use Cilium's fork.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
@aboch
Copy link
Collaborator

aboch commented Jun 3, 2020

LGTM

@aboch aboch merged commit 96dce1c into vishvananda:master Jun 3, 2020
@brb
Copy link
Contributor Author

brb commented Jun 4, 2020

@aboch Thanks!

brb added a commit to cilium/cilium that referenced this pull request Jun 4, 2020
Pull the latest version which includes a new field LinkIndex in Addr
struct [1]. This is going to be used for retrieving link by ip addr.

[1]: vishvananda/netlink#543

Signed-off-by: Martynas Pumputis <m@lambda.lt>
brb added a commit to cilium/cilium that referenced this pull request Jun 5, 2020
Pull the latest version which includes a new field LinkIndex in Addr
struct [1]. This is going to be used for retrieving link by ip addr.

[1]: vishvananda/netlink#543

Signed-off-by: Martynas Pumputis <m@lambda.lt>
brb added a commit to cilium/cilium that referenced this pull request Jun 8, 2020
Pull the latest version which includes a new field LinkIndex in Addr
struct [1]. This is going to be used for retrieving link by ip addr.

[1]: vishvananda/netlink#543

Signed-off-by: Martynas Pumputis <m@lambda.lt>
brb added a commit to cilium/cilium that referenced this pull request Jun 10, 2020
Pull the latest version which includes a new field LinkIndex in Addr
struct [1]. This is going to be used for retrieving link by ip addr.

[1]: vishvananda/netlink#543

Signed-off-by: Martynas Pumputis <m@lambda.lt>
aanm pushed a commit to cilium/cilium that referenced this pull request Jun 11, 2020
Pull the latest version which includes a new field LinkIndex in Addr
struct [1]. This is going to be used for retrieving link by ip addr.

[1]: vishvananda/netlink#543

Signed-off-by: Martynas Pumputis <m@lambda.lt>
aanm pushed a commit to cilium/cilium that referenced this pull request Jun 11, 2020
[ upstream commit 2cd23fe ]

Pull the latest version which includes a new field LinkIndex in Addr
struct [1]. This is going to be used for retrieving link by ip addr.

[1]: vishvananda/netlink#543

Signed-off-by: Martynas Pumputis <m@lambda.lt>
Signed-off-by: André Martins <andre@cilium.io>
joestringer pushed a commit to cilium/cilium that referenced this pull request Jun 12, 2020
[ upstream commit 2cd23fe ]

Pull the latest version which includes a new field LinkIndex in Addr
struct [1]. This is going to be used for retrieving link by ip addr.

[1]: vishvananda/netlink#543

Signed-off-by: Martynas Pumputis <m@lambda.lt>
Signed-off-by: André Martins <andre@cilium.io>
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