diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/fsm_test.go | 2 | ||||
-rw-r--r-- | server/server.go | 2 | ||||
-rw-r--r-- | server/sockopt_linux_test.go | 6 |
3 files changed, 4 insertions, 6 deletions
diff --git a/server/fsm_test.go b/server/fsm_test.go index 5e31c67a..0fb67f98 100644 --- a/server/fsm_test.go +++ b/server/fsm_test.go @@ -309,7 +309,7 @@ func open() *bgp.BGPMessage { []bgp.ParameterCapabilityInterface{bgp.NewCapRouteRefresh()}) p2 := bgp.NewOptionParameterCapability( []bgp.ParameterCapabilityInterface{bgp.NewCapMultiProtocol(bgp.RF_IPv4_UC)}) - g := &bgp.CapGracefulRestartTuple{4, 2, 3} + g := &bgp.CapGracefulRestartTuple{AFI: 4, SAFI: 2, Flags: 3} p3 := bgp.NewOptionParameterCapability( []bgp.ParameterCapabilityInterface{bgp.NewCapGracefulRestart(true, true, 100, []*bgp.CapGracefulRestartTuple{g})}) diff --git a/server/server.go b/server/server.go index d71e45b2..aaa69e7d 100644 --- a/server/server.go +++ b/server/server.go @@ -2515,7 +2515,7 @@ func (w *Watcher) Generate(t WatchEventType) (err error) { } w.notify(&WatchEventTable{PathList: pathList, Neighbor: l}) default: - err = fmt.Errorf("unsupported type ", t) + err = fmt.Errorf("unsupported type %v", t) return } } diff --git a/server/sockopt_linux_test.go b/server/sockopt_linux_test.go index e3ef65d9..f78431af 100644 --- a/server/sockopt_linux_test.go +++ b/server/sockopt_linux_test.go @@ -32,9 +32,8 @@ func Test_buildTcpMD5Sig(t *testing.T) { buf1 := make([]uint8, 216) p := unsafe.Pointer(&s) - src := uintptr(p) for i := uintptr(0); i < 216; i++ { - buf1[i] = *(*byte)(unsafe.Pointer(src + i)) + buf1[i] = *(*byte)(unsafe.Pointer(uintptr(p) + i)) } buf2 := []uint8{2, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 104, 101, 108, 108, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} @@ -51,9 +50,8 @@ func Test_buildTcpMD5Sigv6(t *testing.T) { buf1 := make([]uint8, 216) p := unsafe.Pointer(&s) - src := uintptr(p) for i := uintptr(0); i < 216; i++ { - buf1[i] = *(*byte)(unsafe.Pointer(src + i)) + buf1[i] = *(*byte)(unsafe.Pointer(uintptr(p) + i)) } buf2 := []uint8{10, 0, 0, 0, 0, 0, 0, 0, 254, 128, 0, 0, 0, 0, 0, 0, 72, 80, 49, 255, 254, 1, 252, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 104, 101, 108, 108, 111, 119, 111, 114, 108, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |