Commit 9932ed02 authored by André Valentin's avatar André Valentin Committed by Hans Dedecker

netifd: fix xfrm interface deletion and standardize netlink call

-xfrm interfaces were deleted before
-use standard parameters for xfrm interface created
Signed-off-by: default avatarAndré Valentin <avalentin@marcant.net>
parent 42a38785
......@@ -2883,7 +2883,7 @@ static int system_add_xfrm_tunnel(const char *name, const char *kind,
struct blob_attr *cur;
int ret = 0;
nlm = nlmsg_alloc_simple(RTM_NEWLINK, NLM_F_REQUEST | NLM_F_ACK | NLM_F_CREATE | NLM_F_EXCL);
nlm = nlmsg_alloc_simple(RTM_NEWLINK, NLM_F_REQUEST | NLM_F_REPLACE | NLM_F_CREATE);
if (!nlm)
return -1;
......@@ -3216,7 +3216,8 @@ static int __system_del_ip_tunnel(const char *name, struct blob_attr **tb)
if (!strcmp(str, "greip") || !strcmp(str, "gretapip") ||
!strcmp(str, "greip6") || !strcmp(str, "gretapip6") ||
!strcmp(str, "vtiip") || !strcmp(str, "vtiip6") ||
!strcmp(str, "vxlan") || !strcmp(str, "vxlan6"))
!strcmp(str, "vxlan") || !strcmp(str, "vxlan6") ||
!strcmp(str, "xfrm"))
return system_link_del(name);
else
return tunnel_ioctl(name, SIOCDELTUNNEL, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment