Commit ff97d2a9 authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

vxlan: mdb: Adjust function arguments

Adjust the function's arguments and rename it to allow it to be reused
by future call sites that only have access to 'struct
vxlan_mdb_entry_key', but not to 'struct vxlan_mdb_config'.

No functional changes intended.
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Acked-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6d0259dd
...@@ -370,12 +370,10 @@ static bool vxlan_mdb_is_valid_source(const struct nlattr *attr, __be16 proto, ...@@ -370,12 +370,10 @@ static bool vxlan_mdb_is_valid_source(const struct nlattr *attr, __be16 proto,
return true; return true;
} }
static void vxlan_mdb_config_group_set(struct vxlan_mdb_config *cfg, static void vxlan_mdb_group_set(struct vxlan_mdb_entry_key *group,
const struct br_mdb_entry *entry, const struct br_mdb_entry *entry,
const struct nlattr *source_attr) const struct nlattr *source_attr)
{ {
struct vxlan_mdb_entry_key *group = &cfg->group;
switch (entry->addr.proto) { switch (entry->addr.proto) {
case htons(ETH_P_IP): case htons(ETH_P_IP):
group->dst.sa.sa_family = AF_INET; group->dst.sa.sa_family = AF_INET;
...@@ -503,7 +501,7 @@ static int vxlan_mdb_config_attrs_init(struct vxlan_mdb_config *cfg, ...@@ -503,7 +501,7 @@ static int vxlan_mdb_config_attrs_init(struct vxlan_mdb_config *cfg,
entry->addr.proto, extack)) entry->addr.proto, extack))
return -EINVAL; return -EINVAL;
vxlan_mdb_config_group_set(cfg, entry, mdbe_attrs[MDBE_ATTR_SOURCE]); vxlan_mdb_group_set(&cfg->group, entry, mdbe_attrs[MDBE_ATTR_SOURCE]);
/* rtnetlink code only validates that IPv4 group address is /* rtnetlink code only validates that IPv4 group address is
* multicast. * multicast.
......
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