Skip to content

Commit

Permalink
compat: ip6_tunnel: improve error message.
Browse files Browse the repository at this point in the history
When loading compact ip6 tunnel, if the system already loads upstream
kernel's ip6 tunnel, print error message before return.

Signed-off-by: William Tu <[email protected]>
Cc: Greg Rose <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
williamtu authored and blp committed Jul 31, 2018
1 parent 14faed5 commit dc2700c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions datapath/linux/compat/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2158,8 +2158,11 @@ int rpl_ip6_tunnel_init(void)
return -EOPNOTSUPP;
#endif
err = register_pernet_device(&ip6_tnl_net_ops);
if (err < 0)
if (err < 0) {
pr_err("%s: can't register ip6_tnl pernet device\n",
__func__);
goto out_pernet;
}

err = xfrm6_tunnel_register(&ip4ip6_handler, AF_INET);
if (err < 0) {
Expand All @@ -2172,10 +2175,13 @@ int rpl_ip6_tunnel_init(void)
pr_err("%s: can't register ip6ip6\n", __func__);
goto out_ip6ip6;
}

err = rtnl_link_register(&ip6_link_ops);
if (err < 0)
if (err < 0) {
pr_err("%s: can't register ip6_lin_ops\n",
__func__);
goto rtnl_link_failed;

}
return 0;

rtnl_link_failed:
Expand Down

0 comments on commit dc2700c

Please sign in to comment.