unsigned char params_str[] =
"nh <next-hop> oif <iface-out> iif <iface-in> src <src-addr> next <sid> [next <sid> ...]";
+srv6_as_main_t srv6_as_main;
static inline u8 *
prepare_rewrite (ip6_address_t src_addr, ip6_address_t * sid_list,
iph->src_address = src_addr;
iph->dst_address = sid_list[0];
iph->payload_length = sr_hdr_len;
- iph->hop_limit = IPv6_DEFAULT_HOP_LIMIT;
+ iph->hop_limit = sr_get_hop_limit ();
if (num_sids > 1)
{
srh->length = sr_hdr_len / 8 - 1;
srh->type = ROUTING_HEADER_TYPE_SR;
srh->segments_left = num_sids - 1;
- srh->first_segment = num_sids - 1;
+ srh->last_entry = num_sids - 1;
srh->flags = 0x00;
- srh->reserved = 0x00;
+ srh->tag = 0x0000;
/* Fill segment list */
ip6_address_t *this_address;
- ip6_address_t *addrp = srh->segments + srh->first_segment;
+ ip6_address_t *addrp = srh->segments + srh->last_entry;
vec_foreach (this_address, sid_list)
{
*addrp = *this_address;
/* Prepare rewrite string */
ls_mem->rewrite = prepare_rewrite (ls_mem->src_addr, ls_mem->sid_list,
- IP_PROTOCOL_IP6_NONXT);
+ IP_PROTOCOL_IP6_ETHERNET);
/* Associate local SID index to this interface (resize vector if needed) */
if (ls_mem->sw_if_index_in >= vec_len (sm->sw_iface_localsid2))
/* Allocate and initialize memory block for local SID parameters */
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
- memset (ls_mem, 0, sizeof *ls_mem);
+ clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;
/* Set local SID parameters */
keyword_str,
def_str,
params_str,
+ 128,
&sm->srv6_as_dpo_type,
format_srv6_as_localsid,
unformat_srv6_as_localsid,
VLIB_PLUGIN_REGISTER () = {
.version = VPP_BUILD_VER,
- .description = "Static SRv6 proxy",
+ .description = "Static Segment Routing for IPv6 (SRv6) Proxy",
};
/* *INDENT-ON* */