mirror of
https://github.com/openharmony/kernel_common_modules_newip.git
synced 2026-07-19 16:43:31 -04:00
!45 新增对 nip_local_out 返回值不为 0 时,对应的错误返回值转换
Merge pull request !45 from 史云飞/master
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user