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

fatal error #16

Closed
vtolstov opened this issue Jan 15, 2015 · 8 comments
Closed

fatal error #16

vtolstov opened this issue Jan 15, 2015 · 8 comments

Comments

@vtolstov
Copy link

netlink.RouteAdd(&netlink.Route{LinkIndex: 2, Dst: nil})

How can i add default route ?

@vtolstov
Copy link
Author

Also when i try to get RouteList, i getting empty slice for route, and error is nil.
I think this is not right....

@vishvananda
Copy link
Owner

What is the version of go and your kernel?

@vishvananda
Copy link
Owner

You need to be root to add routes fyi

@vtolstov
Copy link
Author

I'm try to get routes list, but it empty.I run under root

@vtolstov
Copy link
Author

docker-archive/libcontainer#169 for libcontainer I need fix for gateway routes.. May be something needs to..
I have 3.14 kernel,but my program runs by kernel (i m write init replacement)

@vtolstov
Copy link
Author

Also I think that we need to check that in route DST is not nil. Not only IP in DST

func routeHandle(route *Route, req *nl.NetlinkRequest) error {
if route.Dst.IP == nil && route.Src == nil && route.Gw == nil {
return fmt.Errorf("one of Dst.IP, Src, or Gw must not be nil")
}

@vishvananda
Copy link
Owner

ah that is a good point, will make that change.

@vtolstov
Copy link
Author

Now all works fine. I'm fix my errros.

skoef added a commit to skoef/netlink that referenced this issue Apr 28, 2018
# 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@88d2dcc51026, 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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants