mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2025-04-08 10:06:55 +02:00
Remove GetOffloadInfo() (#32)
* Remove GetOffloadInfo() * Remove GetOffloadInfo() from bind_windows as well * Allow lightweight tags to be used in the version
This commit is contained in:
parent
87d8c00f86
commit
2e7780471a
6 changed files with 1 additions and 15 deletions
2
Makefile
2
Makefile
|
@ -9,7 +9,7 @@ MAKEFLAGS += --no-print-directory
|
||||||
|
|
||||||
generate-version-and-build:
|
generate-version-and-build:
|
||||||
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
|
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
|
||||||
tag="$$(git describe --dirty 2>/dev/null)" && \
|
tag="$$(git describe --tags --dirty 2>/dev/null)" && \
|
||||||
ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \
|
ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \
|
||||||
[ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
|
[ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
|
||||||
echo "$$ver" > version.go && \
|
echo "$$ver" > version.go && \
|
||||||
|
|
|
@ -298,11 +298,6 @@ func (s *StdNetBind) BatchSize() int {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StdNetBind) GetOffloadInfo() string {
|
|
||||||
return fmt.Sprintf("ipv4TxOffload: %v, ipv4RxOffload: %v\nipv6TxOffload: %v, ipv6RxOffload: %v",
|
|
||||||
s.ipv4TxOffload, s.ipv4RxOffload, s.ipv6TxOffload, s.ipv6RxOffload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *StdNetBind) Close() error {
|
func (s *StdNetBind) Close() error {
|
||||||
s.mu.Lock()
|
s.mu.Lock()
|
||||||
defer s.mu.Unlock()
|
defer s.mu.Unlock()
|
||||||
|
|
|
@ -328,10 +328,6 @@ func (bind *WinRingBind) BatchSize() int {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
func (bind *WinRingBind) GetOffloadInfo() string {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (bind *WinRingBind) SetMark(mark uint32) error {
|
func (bind *WinRingBind) SetMark(mark uint32) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,8 +91,6 @@ func (c *ChannelBind) Close() error {
|
||||||
|
|
||||||
func (c *ChannelBind) BatchSize() int { return 1 }
|
func (c *ChannelBind) BatchSize() int { return 1 }
|
||||||
|
|
||||||
func (c *ChannelBind) GetOffloadInfo() string { return "" }
|
|
||||||
|
|
||||||
func (c *ChannelBind) SetMark(mark uint32) error { return nil }
|
func (c *ChannelBind) SetMark(mark uint32) error { return nil }
|
||||||
|
|
||||||
func (c *ChannelBind) makeReceiveFunc(ch chan []byte) conn.ReceiveFunc {
|
func (c *ChannelBind) makeReceiveFunc(ch chan []byte) conn.ReceiveFunc {
|
||||||
|
|
|
@ -55,8 +55,6 @@ type Bind interface {
|
||||||
// BatchSize is the number of buffers expected to be passed to
|
// BatchSize is the number of buffers expected to be passed to
|
||||||
// the ReceiveFuncs, and the maximum expected to be passed to SendBatch.
|
// the ReceiveFuncs, and the maximum expected to be passed to SendBatch.
|
||||||
BatchSize() int
|
BatchSize() int
|
||||||
|
|
||||||
GetOffloadInfo() string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// BindSocketToInterface is implemented by Bind objects that support being
|
// BindSocketToInterface is implemented by Bind objects that support being
|
||||||
|
|
|
@ -547,7 +547,6 @@ func (device *Device) BindUpdate() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
device.log.Verbosef("UDP bind has been updated")
|
device.log.Verbosef("UDP bind has been updated")
|
||||||
device.log.Verbosef(netc.bind.GetOffloadInfo())
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue