-
Notifications
You must be signed in to change notification settings - Fork 757
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
IPv6 address not handled properly for Gretun #316
Comments
Thank you for reporting this. Please post a sample go code which shows the issue, and we will go from there, unless you are already working to a patch for it. |
package main
import (
"github.com/vishvananda/netlink"
"log"
"net"
"fmt"
)
func main() {
la := netlink.NewLinkAttrs()
la.Name = "foobar"
l, err := netlink.LinkByName(la.Name)
if err == nil {
log.Fatalf("Link with name %s already exists: %v", la.Name, err) // HERE
} else {
myGretun := &netlink.Gretun{LinkAttrs: la}
myGretun.Remote = net.ParseIP("2001:da8::1")
myGretun.Local = net.ParseIP("2001:da8::2")
err := netlink.LinkAdd(myGretun)
if err != nil {
log.Fatalf("Could not add %s: %v", la.Name, err)
}
l = myGretun
}
fmt.Printf("Information about the created link: %v", l)
} If the
|
Thank you. Yes, the GRE link add part assumes local/remote addresses must be IPv4. |
In iproute2, IPv6 GRE tunnels are called "ip6gre"'s. The current implementation will result in mysterious "file exists" errors when trying to add a Gretun object.
The text was updated successfully, but these errors were encountered: