summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_options.c
diff options
context:
space:
mode:
authorsfeldma@cumulusnetworks.com2013-12-16 01:42:19 +0100
committerDavid S. Miller2013-12-17 22:08:45 +0100
commitd8838de70adc64e20db531333e035aacd5910fca (patch)
treef56a769614db94ee58c127db19da6dadff494c57 /drivers/net/bonding/bond_options.c
parentbonding: add xmit_hash_policy attribute netlink support (diff)
downloadkernel-qcow2-linux-d8838de70adc64e20db531333e035aacd5910fca.tar.gz
kernel-qcow2-linux-d8838de70adc64e20db531333e035aacd5910fca.tar.xz
kernel-qcow2-linux-d8838de70adc64e20db531333e035aacd5910fca.zip
bonding: add resend_igmp attribute netlink support
Add IFLA_BOND_RESEND_IGMP to allow get/set of bonding parameter resend_igmp via netlink. Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_options.c')
-rw-r--r--drivers/net/bonding/bond_options.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 8510c6df115b..1ed7dff9a679 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -561,3 +561,18 @@ int bond_option_xmit_hash_policy_set(struct bonding *bond, int xmit_hash_policy)
return 0;
}
+
+int bond_option_resend_igmp_set(struct bonding *bond, int resend_igmp)
+{
+ if (resend_igmp < 0 || resend_igmp > 255) {
+ pr_err("%s: Invalid resend_igmp value %d not in range 0-255; rejected.\n",
+ bond->dev->name, resend_igmp);
+ return -EINVAL;
+ }
+
+ bond->params.resend_igmp = resend_igmp;
+ pr_info("%s: Setting resend_igmp to %d.\n",
+ bond->dev->name, resend_igmp);
+
+ return 0;
+}