!45 新增对 nip_local_out 返回值不为 0 时,对应的错误返回值转换

Merge pull request !45 from 史云飞/master
This commit is contained in:
openharmony_ci
2022-11-29 13:28:52 +00:00
committed by Gitee
2 changed files with 6 additions and 4 deletions
+5 -2
View File
@@ -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;
}
+1 -2
View File
@@ -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);
}