Skip to content

Commit 228eb5d

Browse files
committed
tcp,udp: m pass uid got from preflow to flow
1 parent c4e7e4c commit 228eb5d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

intra/common.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"math/rand"
1313
"net"
1414
"net/netip"
15+
"strconv"
1516
"strings"
1617
"sync"
1718
"time"
@@ -162,6 +163,9 @@ func (h *baseHandler) onFlow(localaddr, target netip.AddrPort) (fm *Mark, undidA
162163
preuid := UNKNOWN_UID_STR
163164
if hasPre && len(pre.UID) > 0 {
164165
preuid = pre.UID
166+
if c, cerr := strconv.Atoi(pre.UID); cerr == nil {
167+
uid = c
168+
}
165169
}
166170

167171
// alg happens after nat64, and so, alg knows nat-ed ips and un-nats them;

0 commit comments

Comments
 (0)