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

Implement basic `route get` functionality #13

Merged
merged 1 commit into from Jan 14, 2015

Conversation

Projects
None yet
3 participants
@dave-tucker
Contributor

dave-tucker commented Jan 11, 2015

This provides the basic functionality of the iproute2 route get
command. It allows you to query netlink for the route to a destination
IP.Net

While implementing I noticed that the s.Receive() function was hanging
after the netlink response was recieved, so I added an additional clause
to break from the loop and return the decoded message if the NLM_F_MULTI
flag is not set.

Signed-off-by: Dave Tucker dave@dtucker.co.uk

Implement basic `route get` functionality
This provides the basic functionality of the iproute2 `route get`
command. It allows you to query netlink for the route to a destination
IP.Net

While implementing I noticed that the `s.Receive()` function was hanging
after the netlink response was recieved, so I added an additional clause
to break from the loop and return the decoded message if the NLM_F_MULTI
flag is not set.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
@erikh

This comment has been minimized.

erikh commented Jan 11, 2015

+1, would like to see this too.

@vishvananda vishvananda merged commit 80a80ba into vishvananda:master Jan 14, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

skoef added a commit to skoef/netlink that referenced this pull request Apr 28, 2018

# This is a combination of 29 commits.
# This is the 1st commit message:

Added tests for Gretap/Gretun devices

fixed parsing IKey/OKey parameters for Gretun
fixed parsing Local/Remote parameters for Gretap and Gretun
removed irrelevant PMtuDisc parameter from IPv6 Gretaptest

# This is the commit message vishvananda#2:

Support num{tx,rx}queues and udp6zerocsum{tx,rx}

Add IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES in link attribute and
IFLA_VXLAN_UDP_ZERO_CSUM6_TX and IFLA_VXLAN_UDP_ZERO_CSUM6_RX in VXLAN
attribute.

# This is the commit message vishvananda#3:

tuntap: Add multiqueue support

Add multi queue support to tuntap without breaking legacy users
of tuntap.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>

# This is the commit message vishvananda#4:

Fix go build issue for fou code

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>

# This is the commit message vishvananda#5:

Retrieve VLAN and VNI when listing neighbour

# This is the commit message vishvananda#6:

Add requirements to conntrack tests

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>

# This is the commit message vishvananda#7:

Fix LinkAdd for sit tunnel on 3.10 kernel

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>

# This is the commit message vishvananda#8:

Run TestSocketGet in dedicated netns

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>

# This is the commit message vishvananda#9:

Add support for managing source MACVLANs

# This is the commit message vishvananda#10:

Properly tear down netns at the end of test

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>

# This is the commit message vishvananda#11:

Two new functions: LinkSetBondSlave and VethPeerIndex

# This is the commit message vishvananda#12:

Eliminate cgo from netlink.

Signed-off-by: Christopher Koch <chrisko@google.com>

# This is the commit message vishvananda#13:

Don't overwrite the XDP file descriptor with flags

# This is the commit message vishvananda#14:

netlink: allow non linux builds to pass.

# This is the commit message vishvananda#15:

Update bpf_linux.go
# This is the commit message vishvananda#16:

Add Matchall filter

# This is the commit message vishvananda#17:

addr_linux: Skip BROADCAST and LABEL for non-ipv4

The attributes IFA_BROADCAST and IFA_LABEL are only valid for ipv4: they
are not defined for ipv6 here:
http://elixir.free-electrons.com/linux/v4.6/source/net/ipv6/addrconf.c#L4231

This ignores addr.Broadcast and addr.Label for non-ipv4 addresses.

# This is the commit message vishvananda#18:

addr_linux: Implement CacheInfo installation

Currently, Validity and preference information values are ignored in
addrHandle. This adds them to the netlink message when they are passed
by the caller

# This is the commit message vishvananda#19:

Support IPv6 GRE Tun and Tap

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>

# This is the commit message vishvananda#20:

Add a 'ListExisting' option to get the existing entries in the
route/addr/link tables as part of RouteSubscribeWithOptions,
AddrSubscribeWithOptions, and LinkSubscribeWithOptions.

# This is the commit message vishvananda#21:

Run gofmt -s -w on the project

# This is the commit message vishvananda#22:

Add Fq Qdisc support

# This is the commit message vishvananda#23:

Add FQ Codel

# This is the commit message vishvananda#24:

Clarify ESN bitmap length construction logic

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>

# This is the commit message vishvananda#25:

Use IFF_MULTI_QUEUE from x/sys/unix to define TUNTAP_MULTI_QUEUE

Use the constant defined in the golang.org/x/sys/unix package instead of
locally open-coding it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

# This is the commit message vishvananda#26:

Use IFLA_* constants from x/sys/unix

The IFLA_* constants in in x/sys/unix were updated to Linux 4.15 in
golang/sys@88d2dcc, so use these instead of locally duplicating
them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

# This is the commit message vishvananda#27:

Add changelog file, initial release tagging

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>

# This is the commit message vishvananda#28:

Read conntrack flow statistics

This PR allows populating per-connection packet and byte counts to
ConntrackFlow object when nf_conntrack_acct is enabled.

# This is the commit message vishvananda#29:

Add support for setting InfininBand Node and Port GUID of a VF

Add support for setting InfiniBand Node and Port GUID address
configuration of a VF when InfiniBand HCA are used with SR-IOV mode.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment