github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/net/ipv6/helper_unix_test.go (about)

     1  // Copyright 2015 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
     6  // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
     7  
     8  package ipv6_test
     9  
    10  import (
    11  	"fmt"
    12  	"runtime"
    13  )
    14  
    15  func supportsIPv6MulticastDeliveryOnLoopback() (string, bool) {
    16  	switch runtime.GOOS {
    17  	case "freebsd":
    18  		// See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065.
    19  		// Even after the fix, it looks like the latest
    20  		// kernels don't deliver link-local scoped multicast
    21  		// packets correctly.
    22  		return fmt.Sprintf("not supported on %s/%s", runtime.GOOS, runtime.GOARCH), false
    23  	case "openbsd":
    24  		// Multicast packets don't seem to be delivered locally.
    25  		// Issue 42064.
    26  		return fmt.Sprintf("not supported on %s/%s", runtime.GOOS, runtime.GOARCH), false
    27  	default:
    28  		return "", true
    29  	}
    30  }