mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
net: ipv6: rpl_iptunnel: simplify the return expression of rpl_do_srh()
Simplify the return expression. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
57b0637d00
commit
9faad250ce
@ -190,18 +190,13 @@ static int rpl_do_srh(struct sk_buff *skb, const struct rpl_lwt *rlwt)
|
|||||||
{
|
{
|
||||||
struct dst_entry *dst = skb_dst(skb);
|
struct dst_entry *dst = skb_dst(skb);
|
||||||
struct rpl_iptunnel_encap *tinfo;
|
struct rpl_iptunnel_encap *tinfo;
|
||||||
int err = 0;
|
|
||||||
|
|
||||||
if (skb->protocol != htons(ETH_P_IPV6))
|
if (skb->protocol != htons(ETH_P_IPV6))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
tinfo = rpl_encap_lwtunnel(dst->lwtstate);
|
tinfo = rpl_encap_lwtunnel(dst->lwtstate);
|
||||||
|
|
||||||
err = rpl_do_srh_inline(skb, rlwt, tinfo->srh);
|
return rpl_do_srh_inline(skb, rlwt, tinfo->srh);
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rpl_output(struct net *net, struct sock *sk, struct sk_buff *skb)
|
static int rpl_output(struct net *net, struct sock *sk, struct sk_buff *skb)
|
||||||
|
Loading…
Reference in New Issue
Block a user