summaryrefslogtreecommitdiff
path: root/src/libnm-platform/nm-linux-platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnm-platform/nm-linux-platform.c')
-rw-r--r--src/libnm-platform/nm-linux-platform.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c
index 9c9987bbba..c75fb3bf81 100644
--- a/src/libnm-platform/nm-linux-platform.c
+++ b/src/libnm-platform/nm-linux-platform.c
@@ -182,6 +182,7 @@ G_STATIC_ASSERT(RTA_MAX == (__RTA_MAX - 1));
#define IFLA_BOND_PEER_NOTIF_DELAY 28
#define IFLA_BOND_AD_LACP_ACTIVE 29
#define IFLA_BOND_MISSED_MAX 30
+#define IFLA_BOND_NS_IP6_TARGET 31
#undef IFLA_BOND_MAX
@@ -1610,6 +1611,7 @@ _parse_lnk_bond(const char *kind, struct nlattr *info_data)
[IFLA_BOND_PEER_NOTIF_DELAY] = {.type = NLA_U32},
[IFLA_BOND_MISSED_MAX] = {.type = NLA_U8},
[IFLA_BOND_AD_LACP_ACTIVE] = {.type = NLA_U8},
+ [IFLA_BOND_NS_IP6_TARGET] = {.type = NLA_NESTED},
};
NMPlatformLnkBond *props;
struct nlattr *tb[G_N_ELEMENTS(policy)];
@@ -1664,6 +1666,19 @@ _parse_lnk_bond(const char *kind, struct nlattr *info_data)
props->arp_ip_target[props->arp_ip_targets_num++] = nla_get_u32(attr);
}
}
+ if (tb[IFLA_BOND_NS_IP6_TARGET]) {
+ struct nlattr *attr;
+ int rem;
+
+ nla_for_each_nested (attr, tb[IFLA_BOND_NS_IP6_TARGET], rem) {
+ if (props->ns_ip6_targets_num > NM_BOND_MAX_ARP_TARGETS - 1)
+ break;
+ if (nla_len(attr) < sizeof(struct in6_addr))
+ break;
+
+ props->ns_ip6_target[props->ns_ip6_targets_num++] = nla_get_in6_addr(attr);
+ }
+ }
if (tb[IFLA_BOND_ARP_VALIDATE])
props->arp_validate = nla_get_u32(tb[IFLA_BOND_ARP_VALIDATE]);
if (tb[IFLA_BOND_ARP_ALL_TARGETS])
@@ -4709,6 +4724,17 @@ _nl_msg_new_link_set_linkinfo(struct nl_msg *msg, NMLinkType link_type, gconstpo
nla_nest_end(msg, targets);
}
+ if (props->ns_ip6_targets_num > 0) {
+ targets = nla_nest_start(msg, IFLA_BOND_NS_IP6_TARGET);
+ if (!targets)
+ goto nla_put_failure;
+
+ for (i = 0; i < props->ns_ip6_targets_num; i++)
+ NLA_PUT(msg, i, sizeof(struct in6_addr), &props->ns_ip6_target[i]);
+
+ nla_nest_end(msg, targets);
+ }
+
if (props->arp_all_targets)
NLA_PUT_U32(msg, IFLA_BOND_ARP_ALL_TARGETS, props->arp_all_targets);
if (props->arp_interval)