Skip to content

Commit

Permalink
downgrade github.com/iovisor/gobpf to last working version
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Verkhoturov authored and paskal committed May 8, 2020
1 parent aa0fbad commit b6882c1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ install: $(PREFIX)/bin/$(BINARY)

$(BINARY):
$(MAKE) -C pkg/ebpf
go build -ldflags '$(LD_FLAGS)' -o $@ cmd/*.go
go build -ldflags '$(LD_FLAGS)' -o $@ cmd/*.go

$(PREFIX)/bin/$(BINARY): $(BINARY)
install -p -D -m 0755 $< $@
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.12

require (
github.com/cyberdelia/go-metrics-graphite v0.0.0-20161219230853-39f87cc3b432
github.com/iovisor/gobpf v0.0.0-20200504095308-90dbbdfb1358
github.com/iovisor/gobpf v0.0.0-20191118065003-7c4bfe2c0457
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
github.com/rs/zerolog v1.18.0
github.com/spf13/afero v1.2.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/iovisor/gobpf v0.0.0-20200504095308-90dbbdfb1358 h1:Jwlf8GAKb98CrR9WZbUdpe82++USxerHAHqLVt3C8zc=
github.com/iovisor/gobpf v0.0.0-20200504095308-90dbbdfb1358/go.mod h1:+5U5qu5UOu8YJ5oHVLvWKH7/Dr5QNHU7mZ2RfPEeXg8=
github.com/iovisor/gobpf v0.0.0-20191118065003-7c4bfe2c0457 h1:v9kI6h7PYN37stfgwTSaEKSTTPKJEQ6360YDK/GT4To=
github.com/iovisor/gobpf v0.0.0-20191118065003-7c4bfe2c0457/go.mod h1:+5U5qu5UOu8YJ5oHVLvWKH7/Dr5QNHU7mZ2RfPEeXg8=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
Expand Down
12 changes: 6 additions & 6 deletions scripts/centos-fix.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
--- module.go 2019-08-05 13:21:58.655304166 +0200
+++ module.go.new 2019-08-05 13:23:28.055125298 +0200
@@ -81,12 +81,12 @@
+++ module.go 2019-08-05 13:23:28.055125298 +0200
@@ -94,12 +94,12 @@

int bpf_attach_socket(int sock, int fd)
{
- return setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &fd, sizeof(fd));
+ return setsockopt(sock, SOL_SOCKET, SO_ATTACH_FILTER, &fd, sizeof(fd));
}

int bpf_detach_socket(int sock, int fd)
{
- return setsockopt(sock, SOL_SOCKET, SO_DETACH_BPF, &fd, sizeof(fd));
+ return setsockopt(sock, SOL_SOCKET, SO_DETACH_FILTER, &fd, sizeof(fd));
}
*/
import "C"

int bpf_attach_xdp(const char *dev_name, int progfd, uint32_t flags)

0 comments on commit b6882c1

Please sign in to comment.