mirror of
https://github.com/netbirdio/netbird.git
synced 2025-03-04 18:01:13 +01:00
Fix build without import C
This commit is contained in:
parent
f185107268
commit
32b7ced0f8
@ -115,5 +115,6 @@ func _BpfClose(closers ...io.Closer) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Do not access this directly.
|
// Do not access this directly.
|
||||||
|
//
|
||||||
//go:embed bpf_bpfeb.o
|
//go:embed bpf_bpfeb.o
|
||||||
var _BpfBytes []byte
|
var _BpfBytes []byte
|
||||||
|
Binary file not shown.
@ -115,5 +115,6 @@ func _BpfClose(closers ...io.Closer) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Do not access this directly.
|
// Do not access this directly.
|
||||||
|
//
|
||||||
//go:embed bpf_bpfel.o
|
//go:embed bpf_bpfel.o
|
||||||
var _BpfBytes []byte
|
var _BpfBytes []byte
|
||||||
|
Binary file not shown.
@ -3,11 +3,11 @@ package forwarder
|
|||||||
import (
|
import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/cilium/ebpf/link"
|
"github.com/cilium/ebpf/link"
|
||||||
"github.com/cilium/ebpf/rlimit"
|
"github.com/cilium/ebpf/rlimit"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -17,7 +17,7 @@ const (
|
|||||||
|
|
||||||
// libbpf-dev, libc6-dev-i386-amd64-cross
|
// libbpf-dev, libc6-dev-i386-amd64-cross
|
||||||
//
|
//
|
||||||
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -cc clang-14 bpf port_fwd.c -- -I /usr/x86_64-linux-gnu/include
|
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -cc clang-14 bpf src/port_fwd.c -- -I /usr/x86_64-linux-gnu/include
|
||||||
type TrafficForwarder struct {
|
type TrafficForwarder struct {
|
||||||
link link.Link
|
link link.Link
|
||||||
iFaceName string
|
iFaceName string
|
||||||
|
Loading…
Reference in New Issue
Block a user