lwt: Add cfg argument to build_state
Add cfg and family arguments to lwt build state functions. cfg is a void pointer and will either be a pointer to a fib_config or fib6_config structure. The family parameter indicates which one (either AF_INET or AF_INET6). LWT encpasulation implementation may use the fib configuration to build the LWT state. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -123,6 +123,7 @@ static struct nla_policy ila_nl_policy[ILA_ATTR_MAX + 1] = {
|
||||
};
|
||||
|
||||
static int ila_build_state(struct net_device *dev, struct nlattr *nla,
|
||||
unsigned int family, const void *cfg,
|
||||
struct lwtunnel_state **ts)
|
||||
{
|
||||
struct ila_params *p;
|
||||
|
@@ -1819,7 +1819,8 @@ int ip6_route_add(struct fib6_config *cfg)
|
||||
struct lwtunnel_state *lwtstate;
|
||||
|
||||
err = lwtunnel_build_state(dev, cfg->fc_encap_type,
|
||||
cfg->fc_encap, &lwtstate);
|
||||
cfg->fc_encap, AF_INET6, cfg,
|
||||
&lwtstate);
|
||||
if (err)
|
||||
goto out;
|
||||
rt->dst.lwtstate = lwtstate_get(lwtstate);
|
||||
|
Reference in New Issue
Block a user