From 5f9bf851ae46820859f5c7c7383a609b2e87a6d0 Mon Sep 17 00:00:00 2001 From: shiyunfei Date: Tue, 29 Nov 2022 18:13:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=B9=20nip=5Flocal=5Fout?= =?UTF-8?q?=20=E8=BF=94=E5=9B=9E=E5=80=BC=E4=B8=8D=E4=B8=BA=200=20?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=AF=B9=E5=BA=94=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shiyunfei --- src/linux/net/newip/nip_output.c | 7 +++++-- src/linux/net/newip/tcp_nip.c | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/linux/net/newip/nip_output.c b/src/linux/net/newip/nip_output.c index 3338fe3..db12578 100644 --- a/src/linux/net/newip/nip_output.c +++ b/src/linux/net/newip/nip_output.c @@ -103,8 +103,11 @@ int nip_send_skb(struct sk_buff *skb) net = skb->sk ? sock_net(skb->sk) : dev_net(skb_dst(skb)->dev); err = nip_local_out(net, skb->sk, skb); - if (err) - DEBUG("%s: failed to out skb!", __func__); + if (err) { + if (err > 0) + err = net_xmit_errno(err); + DEBUG("%s: failed to out skb! err = %d", __func__, err); + } return err; } diff --git a/src/linux/net/newip/tcp_nip.c b/src/linux/net/newip/tcp_nip.c index dca3771..60b949a 100644 --- a/src/linux/net/newip/tcp_nip.c +++ b/src/linux/net/newip/tcp_nip.c @@ -1528,8 +1528,7 @@ static void tcp_nip_early_demux(struct sk_buff *skb) if (dst) dst = dst_check(dst, 0); - if (dst && - inet_sk(sk)->rx_dst_ifindex == skb->skb_iif) { + if (dst && inet_sk(sk)->rx_dst_ifindex == skb->skb_iif) { DEBUG("%s: find sock in ehash, set dst for skb", __func__); skb_dst_set_noref(skb, dst); } -- Gitee