Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: WireGuard/wireguard-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 58beb0f832dc650347fbeb11d568a68b60d33e56
Choose a base ref
..
head repository: WireGuard/wireguard-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 54dbe2471f8ed67f49e8b5e5c92f6f4eb4a5a912
Choose a head ref
Showing with 2 additions and 4 deletions.
  1. +2 −4 conn/conn.go
6 changes: 2 additions & 4 deletions conn/conn.go
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ import (
"reflect"
"runtime"
"strings"
"unsafe"
)

// A ReceiveFunc receives a single inbound packet from the network.
@@ -79,8 +78,7 @@ var (
)

func (fn ReceiveFunc) PrettyName() string {
ptr := reflect.ValueOf(fn).Pointer()
name := runtime.FuncForPC(ptr).Name()
name := runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name()
// 0. cheese/taco.beansIPv6.func12.func21218-fm
name = strings.TrimSuffix(name, "-fm")
// 1. cheese/taco.beansIPv6.func12.func21218
@@ -111,7 +109,7 @@ func (fn ReceiveFunc) PrettyName() string {
// 5. beansIPv6
}
if name == "" {
return fmt.Sprintf("%p", unsafe.Pointer(ptr))
return fmt.Sprintf("%p", fn)
}
if strings.HasSuffix(name, "IPv4") {
return "v4"