From e1fcd4654b05457801fe03e519324a03aeebb9b0 Mon Sep 17 00:00:00 2001 From: oracl Date: Fri, 19 Jan 2024 18:59:03 +0800 Subject: [PATCH] chore: remove redundant lines for DSCP --- listener/tproxy/udp_linux.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/listener/tproxy/udp_linux.go b/listener/tproxy/udp_linux.go index f7f0fd0f..02b51379 100644 --- a/listener/tproxy/udp_linux.go +++ b/listener/tproxy/udp_linux.go @@ -105,15 +105,10 @@ func getOrigDst(oob []byte) (netip.AddrPort, error) { // retrieve the destination address from the SCM. sa, err := unix.ParseOrigDstAddr(&scms[1]) - if err != nil { return netip.AddrPort{}, fmt.Errorf("retrieve destination: %w", err) } - if err != nil { - return netip.AddrPort{}, fmt.Errorf("retrieve DSCP: %w", err) - } - // encode the destination address into a cmsg. var rAddr netip.AddrPort switch v := sa.(type) {