aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2018-04-09DVR: save the rewrite length in packet meta-data for featuresNeale Ranns1-3/+9
2018-04-09make test: fix failure on centosKlement Sekera1-1/+1
2018-04-08Restore building of debuginfo RPMsThomas F Herbert1-10/+2
2018-04-08Remove subunit from Centos requirements.Thomas F Herbert2-2/+4
2018-04-07BIER coveroty fix for unintialised return value on errorNeale Ranns1-1/+1
2018-04-06Change l2-fwd node to allow possible feature before UU-FLOODJohn Lo1-6/+14
2018-04-06Remove mbedtls from build requirement for CentosThomas F Herbert2-2/+4
2018-04-05VOM: Get vhost-user type from nameMohsin Kazmi1-1/+2
2018-04-05IPIP: version.h is not neededNeale Ranns1-1/+0
2018-04-05memif: bug fixesDamjan Marion2-22/+74
2018-04-05VOM: Add sub_interface in specific routing tableMohsin Kazmi2-0/+19
2018-04-05DSLite: Implement new API call DSLITE_ADDRESS_DUMP.Jon Loeliger2-0/+67
2018-04-04Bump package versionChris Luke1-1/+1
2018-04-04Hm this ended up on master, but should not have.v18.07-rc0Chris Luke1-1/+0
2018-04-04Setup for branch stable/1804Chris Luke1-0/+1
2018-04-04Doc updates prior to branchChris Luke6-16/+40
2018-04-04memif: zero copy slaveDamjan Marion7-145/+677
2018-04-04Detailed stats collection featureNeale Ranns12-41/+434
2018-04-04NAT added FIB entries have a preference lower than API/CLINeale Ranns3-6/+12
2018-04-04NAT44: prohibit multiple static mappings for a single local address (VPP-1224)Matus Fabian1-0/+11
2018-04-04NAT44: fix static mapping for DHCP addressed interface deleting (VPP-1223)Matus Fabian1-4/+92
2018-04-04dpdk:fix checksum handling of l2 interfacesEyal Bari1-17/+19
2018-04-03Makefile: Alter VPP_PYTHON_PREFIX for preloading depsEd Kern2-1/+6
2018-04-03reassembly: bug fixesKlement Sekera4-19/+23
2018-04-03Fix bugs in emacs plugin templatesDave Barach2-22/+17
2018-04-03session: use fib index in ip local testFlorin Coras1-1/+1
2018-03-31make test: print a warning in case a core_pattern contains a filter programAndrew Yourtchenko3-0/+19
2018-03-30tapv2: Sporadic SIGABRT in ethernet_input [VPP-1183]Steven2-5/+6
2018-03-30libmemif: zero-copy-slave mode + header spaceJakub Grajciar10-72/+1696
2018-03-30acl-plugin: implement an optional session reclassification when ACL is (re-)a...Andrew Yourtchenko4-10/+128
2018-03-30Updated sample startup.conf with supported plugin config options.Maciek Konstantynowicz1-10/+19
2018-03-30Fix minor issues.John DeNisco4-8/+24
2018-03-30Add missing stdint.hChris Luke1-0/+1
2018-03-30lacp: faster convergence for slow-rate config optionSteven6-18/+29
2018-03-30bond: show trace causes a crash if the interface is deletedSteven3-13/+32
2018-03-30dpdk: fix crash due to incorrect xd->flags value with slave's link togglingSteve Shin1-2/+5
2018-03-29Coverity fixes (VPP-1204)Chris Luke6-13/+17
2018-03-29ip6: fix ip6-local urpf checkingFlorin Coras2-9/+10
2018-03-29l2_input:optimize counter accessEyal Bari1-31/+16
2018-03-29tcp: fix fib index buffer taggingFlorin Coras4-33/+44
2018-03-29No need for this routine to be globalDave Barach1-1/+1
2018-03-28vom: Fix the error handling for already existing itfMohsin Kazmi1-1/+5
2018-03-28Build libmemif as part of verify jobDamjan Marion7-7/+17
2018-03-28bond: cli renameSteven1-11/+10
2018-03-28SCTP: use custom fibMarco Varlese2-7/+12
2018-03-28libmemif: add private header size fieldJakub Grajciar4-2/+10
2018-03-28NAT44: make 1:1NAT for DHCP addressed interface persistentMatus Fabian2-34/+101
2018-03-28test: fix VppNeighbor.query_vpp_configNeale Ranns1-14/+10
2018-03-28avf: keep input node in disabled state unless neededDamjan Marion1-1/+1
2018-03-28NAT44: fix nat44_user_session_dump and nat44_del_session crash with one worke...Matus Fabian2-2/+2
an>->ce_ip, &out->addr); else clib_memset ((void *) &in->ce_ip, 0, sizeof (in->ce_ip)); } static void vl_api_cnat_translation_update_t_handler (vl_api_cnat_translation_update_t * mp) { vl_api_cnat_translation_update_reply_t *rmp; cnat_endpoint_t vip; cnat_endpoint_tuple_t *paths = NULL, *path; ip_protocol_t ip_proto; u32 id = ~0; u8 flags; int rv = 0; u32 pi, n_paths; cnat_lb_type_t lb_type; rv = ip_proto_decode (mp->translation.ip_proto, &ip_proto); if (rv) goto done; n_paths = clib_net_to_host_u32 (mp->translation.n_paths); vec_validate (paths, n_paths - 1); for (pi = 0; pi < n_paths; pi++) { path = &paths[pi]; rv = cnat_endpoint_tuple_decode (&mp->translation.paths[pi], path); if (rv) goto done; } rv = cnat_endpoint_decode (&mp->translation.vip, &vip); if (rv) goto done; flags = mp->translation.flags; if (!mp->translation.is_real_ip) flags |= CNAT_FLAG_EXCLUSIVE; lb_type = (cnat_lb_type_t) mp->translation.lb_type; id = cnat_translation_update (&vip, ip_proto, paths, flags, lb_type); vec_free (paths); done: REPLY_MACRO2 (VL_API_CNAT_TRANSLATION_UPDATE_REPLY, ({ rmp->id = htonl (id); })); } static void vl_api_cnat_translation_del_t_handler (vl_api_cnat_translation_del_t * mp) { vl_api_cnat_translation_del_reply_t *rmp; int rv; rv = cnat_translation_delete (ntohl (mp->id)); REPLY_MACRO (VL_API_CNAT_TRANSLATION_DEL_REPLY); } typedef struct cnat_dump_walk_ctx_t_ { vl_api_registration_t *rp; u32 context; } cnat_dump_walk_ctx_t; static walk_rc_t cnat_translation_send_details (u32 cti, void *args) { vl_api_cnat_translation_details_t *mp; cnat_dump_walk_ctx_t *ctx; cnat_ep_trk_t *trk; vl_api_cnat_endpoint_tuple_t *path; size_t msg_size; cnat_translation_t *ct; u32 n_paths; ctx = args; ct = cnat_translation_get (cti); n_paths = vec_len (ct->ct_paths); msg_size = sizeof (*mp) + sizeof (mp->translation.paths[0]) * n_paths; mp = vl_msg_api_alloc_zero (msg_size); mp->_vl_msg_id = ntohs (VL_API_CNAT_TRANSLATION_DETAILS + cnat_base_msg_id); /* fill in the message */ mp->context = ctx->context; mp->translation.n_paths = clib_host_to_net_u32 (n_paths); mp->translation.id = clib_host_to_net_u32 (cti); cnat_endpoint_encode (&ct->ct_vip, &mp->translation.vip); mp->translation.ip_proto = ip_proto_encode (ct->ct_proto); mp->translation.lb_type = (vl_api_cnat_lb_type_t) ct->lb_type; path = mp->translation.paths; vec_foreach (trk, ct->ct_paths) { cnat_endpoint_encode (&trk->ct_ep[VLIB_TX], &path->dst_ep); cnat_endpoint_encode (&trk->ct_ep[VLIB_RX], &path->src_ep); path->flags = trk->ct_flags; path++; } vl_api_send_msg (ctx->rp, (u8 *) mp); return (WALK_CONTINUE); } static void vl_api_cnat_translation_dump_t_handler (vl_api_cnat_translation_dump_t * mp) { vl_api_registration_t *rp; rp = vl_api_client_index_to_registration (mp->client_index); if (rp == 0) return; cnat_dump_walk_ctx_t ctx = { .rp = rp, .context = mp->context, }; cnat_translation_walk (cnat_translation_send_details, &ctx); } static void ip_address2_from_46 (const ip46_address_t * nh, ip_address_family_t af, ip_address_t * ip) { ip_addr_46 (ip) = *nh; ip_addr_version (ip) = af; } static walk_rc_t cnat_session_send_details (const cnat_session_t * session, void *args) { vl_api_cnat_session_details_t *mp; cnat_dump_walk_ctx_t *ctx; cnat_endpoint_t ep; ctx = args; mp = vl_msg_api_alloc_zero (sizeof (*mp)); mp->_vl_msg_id = ntohs (VL_API_CNAT_SESSION_DETAILS + cnat_base_msg_id); /* fill in the message */ mp->context = ctx->context; ep.ce_sw_if_index = INDEX_INVALID; ep.ce_flags = CNAT_EP_FLAG_RESOLVED; ip_address2_from_46 (&session->value.cs_ip[VLIB_TX], session->key.cs_af, &ep.ce_ip); ep.ce_port = clib_host_to_net_u16 (session->value.cs_port[VLIB_TX]); cnat_endpoint_encode (&ep, &mp->session.new); ip_address2_from_46 (&session->key.cs_ip[VLIB_RX], session->key.cs_af, &ep.ce_ip); ep.ce_port = clib_host_to_net_u16 (session->key.cs_port[VLIB_RX]); cnat_endpoint_encode (&ep, &mp->session.src); ip_address2_from_46 (&session->key.cs_ip[VLIB_TX], session->key.cs_af, &ep.ce_ip); ep.ce_port = clib_host_to_net_u16 (session->key.cs_port[VLIB_TX]); cnat_endpoint_encode (&ep, &mp->session.dst); mp->session.ip_proto = ip_proto_encode (session->key.cs_proto); mp->session.location = session->key.cs_loc; vl_api_send_msg (ctx->rp, (u8 *) mp); return (WALK_CONTINUE); } static void vl_api_cnat_session_dump_t_handler (vl_api_cnat_session_dump_t * mp) { vl_api_registration_t *rp; rp = vl_api_client_index_to_registration (mp->client_index); if (rp == 0) return; cnat_dump_walk_ctx_t ctx = { .rp = rp, .context = mp->context, }; cnat_session_walk (cnat_session_send_details, &ctx); } static void vl_api_cnat_session_purge_t_handler (vl_api_cnat_session_purge_t * mp) { vl_api_cnat_session_purge_reply_t *rmp; int rv; cnat_client_throttle_pool_process (); rv = cnat_session_purge (); rv |= cnat_translation_purge (); REPLY_MACRO (VL_API_CNAT_SESSION_PURGE_REPLY); } static void vl_api_cnat_get_snat_addresses_t_handler (vl_api_cnat_get_snat_addresses_t * mp) { vl_api_cnat_get_snat_addresses_reply_t *rmp; cnat_snat_policy_main_t *cpm = &cnat_snat_policy_main; int rv = 0; REPLY_MACRO2 ( VL_API_CNAT_GET_SNAT_ADDRESSES_REPLY, ({ ip6_address_encode (&ip_addr_v6 (&cpm->snat_ip6.ce_ip), rmp->snat_ip6); ip4_address_encode (&ip_addr_v4 (&cpm->snat_ip4.ce_ip), rmp->snat_ip4); rmp->sw_if_index = clib_host_to_net_u32 (cpm->snat_ip6.ce_sw_if_index); })); } static void vl_api_cnat_set_snat_addresses_t_handler (vl_api_cnat_set_snat_addresses_t * mp) { vl_api_cnat_set_snat_addresses_reply_t *rmp; u32 sw_if_index = clib_net_to_host_u32 (mp->sw_if_index); ip4_address_t ip4; ip6_address_t ip6; int rv = 0; ip4_address_decode (mp->snat_ip4, &ip4); ip6_address_decode (mp->snat_ip6, &ip6); cnat_set_snat (&ip4, &ip6, sw_if_index); REPLY_MACRO (VL_API_CNAT_SET_SNAT_ADDRESSES_REPLY); } static void vl_api_cnat_set_snat_policy_t_handler (vl_api_cnat_set_snat_policy_t *mp) { vl_api_cnat_set_snat_policy_reply_t *rmp; int rv = 0; cnat_snat_policy_type_t policy = (cnat_snat_policy_type_t) mp->policy; rv = cnat_set_snat_policy (policy); REPLY_MACRO (VL_API_CNAT_SET_SNAT_POLICY_REPLY); } static void vl_api_cnat_snat_policy_add_del_exclude_pfx_t_handler ( vl_api_cnat_snat_policy_add_del_exclude_pfx_t *mp) { vl_api_cnat_snat_policy_add_del_exclude_pfx_reply_t *rmp; ip_prefix_t pfx; int rv; ip_prefix_decode2 (&mp->prefix, &pfx); if (mp->is_add) rv = cnat_snat_policy_add_pfx (&pfx); else rv = cnat_snat_policy_del_pfx (&pfx); REPLY_MACRO (VL_API_CNAT_SNAT_POLICY_ADD_DEL_EXCLUDE_PFX_REPLY); } static void vl_api_cnat_snat_policy_add_del_if_t_handler ( vl_api_cnat_snat_policy_add_del_if_t *mp) { vl_api_cnat_snat_policy_add_del_if_reply_t *rmp; u32 sw_if_index = ntohl (mp->sw_if_index); int rv = 0; VALIDATE_SW_IF_INDEX (mp); cnat_snat_interface_map_type_t table = (cnat_snat_interface_map_type_t) mp->table; rv = cnat_snat_policy_add_del_if (sw_if_index, mp->is_add, table); BAD_SW_IF_INDEX_LABEL; REPLY_MACRO (VL_API_CNAT_SNAT_POLICY_ADD_DEL_IF_REPLY); } #include <cnat/cnat.api.c> static clib_error_t * cnat_api_init (vlib_main_t * vm) { /* Ask for a correctly-sized block of API message decode slots */ cnat_base_msg_id = setup_message_id_table (); return 0; } VLIB_INIT_FUNCTION (cnat_api_init); VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "CNat Translate", }; /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */