mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-14 09:48:47 +07:00
fix: problem that cannot proxy lan_interface
This commit is contained in:
@ -53,4 +53,5 @@ See [example.dae](https://github.com/v2rayA/dae/blob/main/example.dae).
|
||||
1. Handle the case that nodes do not support UDP.
|
||||
1. L4Checksum problem.
|
||||
1. Config support list like: `wan_interface: [wlp5s0, eth0]`.
|
||||
1. MACv2 extension extraction.
|
||||
1. ...
|
||||
|
@ -104,7 +104,7 @@ type bpfObjectsLan struct {
|
||||
bpfMaps
|
||||
}
|
||||
|
||||
func AssignBpfPrograms(to *bpfObjects, from interface{}) {
|
||||
func AssignBpfObjects(to *bpfObjects, from interface{}) {
|
||||
vTo := reflect.Indirect(reflect.ValueOf(to))
|
||||
vFrom := reflect.Indirect(reflect.ValueOf(from))
|
||||
tFrom := vFrom.Type()
|
||||
|
@ -125,7 +125,7 @@ retryLoadBpf:
|
||||
}
|
||||
if kernelVersion.Less(consts.FtraceFeatureVersion) {
|
||||
// Reverse takeover.
|
||||
AssignBpfPrograms(&bpf, &bpfLan)
|
||||
AssignBpfObjects(&bpf, &bpfLan)
|
||||
}
|
||||
|
||||
// Write params.
|
||||
@ -581,7 +581,7 @@ func (c *ControlPlane) ListenAndServe(port uint16) (err error) {
|
||||
go func() {
|
||||
defer cancel()
|
||||
for {
|
||||
var buf [65536]byte
|
||||
var buf [65535]byte
|
||||
n, lAddrPort, err := lConn.ReadFromUDPAddrPort(buf[:])
|
||||
if err != nil {
|
||||
if !strings.Contains(err.Error(), "use of closed network connection") {
|
||||
|
@ -566,7 +566,7 @@ static __always_inline int get_tproxy_ip(__u8 ipversion, __u32 ifindex,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static __always_inline int ip_is_host(bool ipversion, __u32 ifindex,
|
||||
static __always_inline int ip_is_host(__u8 ipversion, __u32 ifindex,
|
||||
__be32 ip[4], __be32 tproxy_ip[4]) {
|
||||
if (tproxy_ip) {
|
||||
int ret;
|
||||
|
Reference in New Issue
Block a user