summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/netlink.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-02-14 17:51:04 +0000
committerDamjan Marion <dmarion@me.com>2020-03-05 11:09:19 +0000
commitb49bc1ae6404f0dff373578786a9fd95d961e5cd (patch)
tree448558e4c18d5fbb6996cfaed793f9f91aecb055 /src/vnet/devices/netlink.c
parentea2abbaeaf34a4652e970fd1e2f60c0d377ebde4 (diff)
tap: add support for persistance
Type: feature Change-Id: I775f53531972447ebae0d69b9e2dfeee84d115e5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/netlink.c')
-rw-r--r--src/vnet/devices/netlink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/devices/netlink.c b/src/vnet/devices/netlink.c
index f070602f1aa..e3e33a3b2d0 100644
--- a/src/vnet/devices/netlink.c
+++ b/src/vnet/devices/netlink.c
@@ -243,7 +243,7 @@ vnet_netlink_add_ip4_addr (int ifindex, void *addr, int pfx_len)
ifa.ifa_index = ifindex;
vnet_netlink_msg_init (&m, RTM_NEWADDR,
- NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL,
+ NLM_F_REQUEST | NLM_F_REPLACE,
&ifa, sizeof (struct ifaddrmsg));
vnet_netlink_msg_add_rtattr (&m, IFA_LOCAL, addr, 4);
@@ -266,7 +266,7 @@ vnet_netlink_add_ip6_addr (int ifindex, void *addr, int pfx_len)
ifa.ifa_index = ifindex;
vnet_netlink_msg_init (&m, RTM_NEWADDR,
- NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL,
+ NLM_F_REQUEST | NLM_F_REPLACE,
&ifa, sizeof (struct ifaddrmsg));
vnet_netlink_msg_add_rtattr (&m, IFA_LOCAL, addr, 16);
@@ -291,7 +291,7 @@ vnet_netlink_add_ip4_route (void *dst, u8 dst_len, void *gw)
rtm.rtm_dst_len = dst_len;
vnet_netlink_msg_init (&m, RTM_NEWROUTE,
- NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL,
+ NLM_F_REQUEST | NLM_F_REPLACE,
&rtm, sizeof (struct rtmsg));
vnet_netlink_msg_add_rtattr (&m, RTA_GATEWAY, gw, 4);
@@ -316,7 +316,7 @@ vnet_netlink_add_ip6_route (void *dst, u8 dst_len, void *gw)
rtm.rtm_dst_len = dst_len;
vnet_netlink_msg_init (&m, RTM_NEWROUTE,
- NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL,
+ NLM_F_REQUEST | NLM_F_REPLACE,
&rtm, sizeof (struct rtmsg));
vnet_netlink_msg_add_rtattr (&m, RTA_GATEWAY, gw, 16);