if (skb->protocol != htons(ETH_P_IPV6)) goto drop;
if (ilwt->lwt_output)
ila_update_ipv6_locator(skb,
ila_params_lwtunnel(orig_dst->lwtstate), true);
if (rt->rt6i_flags & (RTF_GATEWAY | RTF_CACHE)) { /* Already have a next hop address in route, no need for * dest cache route.
*/ return orig_dst->lwtstate->orig_output(net, sk, skb);
}
ret = nla_parse_nested_deprecated(tb, ILA_ATTR_MAX, nla,
ila_nl_policy, extack); if (ret < 0) return ret;
if (!tb[ILA_ATTR_LOCATOR]) return -EINVAL;
iaddr = (struct ila_addr *)&cfg6->fc_dst;
if (tb[ILA_ATTR_IDENT_TYPE])
ident_type = nla_get_u8(tb[ILA_ATTR_IDENT_TYPE]);
if (ident_type == ILA_ATYPE_USE_FORMAT) { /* Infer identifier type from type field in formatted * identifier.
*/
if (cfg6->fc_dst_len < 8 * sizeof(struct ila_locator) + 3) { /* Need to have full locator and at least type field * included in destination
*/ return -EINVAL;
}
switch (eff_ident_type) { case ILA_ATYPE_IID: /* Don't allow ILA for IID type */ return -EINVAL; case ILA_ATYPE_LUID: break; case ILA_ATYPE_VIRT_V4: case ILA_ATYPE_VIRT_UNI_V6: case ILA_ATYPE_VIRT_MULTI_V6: case ILA_ATYPE_NONLOCAL_ADDR: /* These ILA formats are not supported yet. */ default: return -EINVAL;
}
if (tb[ILA_ATTR_HOOK_TYPE])
hook_type = nla_get_u8(tb[ILA_ATTR_HOOK_TYPE]);
switch (hook_type) { case ILA_HOOK_ROUTE_OUTPUT:
lwt_output = true; break; case ILA_HOOK_ROUTE_INPUT:
lwt_output = false; break; default: return -EINVAL;
}
if (tb[ILA_ATTR_CSUM_MODE])
csum_mode = nla_get_u8(tb[ILA_ATTR_CSUM_MODE]);
if (csum_mode == ILA_CSUM_NEUTRAL_MAP &&
ila_csum_neutral_set(iaddr->ident)) { /* Don't allow translation if checksum neutral bit is * configured and it's set in the SIR address.
*/ return -EINVAL;
}
newts = lwtunnel_state_alloc(sizeof(*ilwt)); if (!newts) return -ENOMEM;
ilwt = ila_lwt_lwtunnel(newts);
ret = dst_cache_init(&ilwt->dst_cache, GFP_ATOMIC); if (ret) {
kfree(newts); return ret;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.