aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-10-26VCL: add session namespace support.Dave Wallace6-28/+175
Change-Id: I04f1b63e66260d99c0dd180b0295a55a9b750df7 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-26Allow IPsec interface to have SAs resetMatthew Smith6-1/+177
Make it easier to integrate with external IKE daemon. IPsec interfaces can have one or both SAs replaced after creation. This allows for the possibility of setting a new child SA on an interface when rekeying occurs. It also allows for the possibility of creating an interface ahead of time and updating the SA when parameters that are negotiated during IKE exchange become known. Change-Id: I0a31afdcc2bdff7098a924a51abbc58bdab2bd08 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-10-25VCL: Return data for recvfrom(MSG_PEEK)Steven1-11/+23
Implement recvfrom(MSG_PEEK) by returning data in the provided buffer without moving the read pointer Change-Id: Idc1b22632d78e8a499cce7d48c15e8bab0b0bf88 Signed-off-by: Steven <sluong@cisco.com>
2017-10-25lldp: protection code to check a valid interface indexSteve Shin1-2/+9
When lldp interface is set, it's better to check valid interface index. Change-Id: I0db0ab6483ad73d28c69893576aa9b719c3b087c Signed-off-by: Steve Shin <jonshin@cisco.com>
2017-10-25VCL-LDPRELOAD: statically link VPP objects into libvcl_ldpreload.soDave Wallace3-16/+18
Change-Id: If8fb5484b64a5b1c04e34573490fedcf63feabc9 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-25vlib: add support for multiple buffer poolsDamjan Marion11-38/+79
Change-Id: Icaf7d7ad47284aea7a56e8006b69f45874d64202 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-10-25Do not include x86intrin.h if unavailableGabriel Ganne1-0/+2
This fixes compilations on arm platforms. The call to the function itself was protected, and used clib_xxhash instead. Only the header protection was missing. Change-Id: I9fac252a5732e1a9808cf7de93fa3d5f07bcebe6 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-10-25VPP-1033: Python API support arbitrary sized input parameters.Ole Troan1-13/+49
Dynamically calculate the required buffer size to pack into based on message definition. Also add input parameter length checking. Change-Id: I7633bec596e4833bb328fbf63a65b866c7985de5 Signed-off-by: Ole Troan <ot@cisco.com>
2017-10-25L3 proxy FIB source for container networkingAndrew Yourtchenko15-10/+382
Change-Id: I4164c4c19c8dbfd73e6ddf94a12056325cc093b9 Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-10-25One armed NAT (VPP-1035)Matus Fabian8-33/+289
Use a single physical interface in order to accomplish NAT44/NAT64. Change-Id: I0c8138953a7a4075df306172e125abad771315e4 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-10-25VCL/LDPRELOAD: Add support for getsockopt, sendto, and recvfromSteven3-34/+194
Add support for getsockopt, sendto, and recvfrom. Not all options for the system calls are supported yet. Only the options used by curl and wget are supported for now. Change-Id: I2e0ed7349a0273616b3831c201e7c117725ca287 Signed-off-by: Steven <sluong@cisco.com>
2017-10-24VCL-LDPRELOAD: Fix coverity warnings.Dave Wallace3-12/+12
- CID 178225: Constant expression result - CID 178220: Logically dead code - CID 178222: Logically dead code - CID 178227: Logically dead code - CID 178223: Same on both sides - CID 178226: Same on both sides Change-Id: Ie0c80edb41390cf2308e54938be85d865e292138 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-24VCL-LDPRELOAD: statically link vppcom into libvcl-ldpreload.soDave Wallace18-44/+9020
- Move VCL & VCL-LDPRELOAD source into src/vcl - Statically link vppcom into libvcl-ldpreload.so Change-Id: I778300b37e8b06640d9dbc01caf297edf7a6edb7 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-24Update L2 header offset after VLAN tag rewriteNeale Ranns1-1/+3
Change-Id: I5c1df59bce7c9654101672a12981e5bd62e9adc4 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-10-24Add extern to *_main global variable declarations in header files.Dave Wallace65-46/+85
- Global variables declared in header files without the use of the 'extern' keword will result in multiple instances of the variable to be created by the compiler -- one for each different source file in which the the header file is included. This results in wasted memory allocated in the BSS segments as well as potentially introducing bugs in the application. Change-Id: I6ef1790b60a0bd9dd3994f8510723decf258b0cc Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-23af_packet: invalid TCP/UDP offload checksum on RX node recalculationJakub Grajciar6-3/+171
Change-Id: I1075e5d2a1b6dfe3a443b40b41b8458a30505680 Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech> Signed-off-by: Jakub.Grajciar@pantheon.tech <Jakub.Grajciar@pantheon.tech>
2017-10-23VXLAN:small refactor to vxlan inputEyal Bari1-235/+175
Change-Id: I2e7e08e1de20ab57e3f899b080b90a3082219ae5 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-10-20Thread_index for thread0 in vlib_global_main not initialisedKeith Burns (alagalah)1-0/+1
Change-Id: Ie49ee865b197e8fe7bba170c115a4ccbf1013e5f Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-10-20VCL: Fix converity warning CID 177864Dave Wallace1-2/+2
Change-Id: Id8578321381d14f9de827767ef0acf627f1535e4 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-20VCL-LDPRELOAD: Refactor vcom_socket* and fix crash in vppcom_selectDave Wallace1-85/+98
- filter verbose debug output with VCOM_DEBUG > 2 - clean up nomenclature, renaming vppcom_*() functions to vcom_session_*() - fix vppcom_select crash with NULL maps. Change-Id: I6e416a096d6fd800aa26991c2439e24e8fc38cc5 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-20Add reverse DNS (ip to name) resolutionDave Barach7-38/+402
Change-Id: Ic531d820b1846ff7363e5c396ac0b1176e87b401 Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-20null-terminate some formatted stringGabriel Ganne4-0/+19
Any u8* variable created by format() is NOT null-terminated. Add the null terminating byte with vec_terminate_c_string(). If that variable is used by (at least) hash_get_mem(), then it needs to be null-terminated, as it will go through string_key_sum() which makes a call to strlen. Change-Id: I4e51e1b6668f557e53af3bb897cd281598eedbc0 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-10-20add cuckoo hashKlement Sekera8-1/+2483
Change-Id: I78215041588014e9e5c3599c60471ced610735bb Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-10-19VCL: cleanup misc. issues in vppcomDave Wallace1-6/+10
- Fix vppcom_select crash when n_bits == 0 - Enhance debug output - Remove port byte-swapping during accept Change-Id: I6ccd1040ceb82908d924220f558df803ab5eea30 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-19Remove unused 'not_last' parameter from ip_add_del_routeMarek Gradzki3-10/+0
Vat supports setting value for the parameter, but 'not_last' is ignored by ip_add_del_route handler, so can be removed. This patch - updates ip.api, - removes vat handlers - updates vpp_papi_provider.py (also mpls_route_add_del with unused not_last) Change-Id: Ife15de123db4bc8247103a29b90bce1988e46534 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-10-19VPP-1024: rewrite buffer trajectory tracerDave Barach7-50/+161
Use a proper u16 * vector to capture node indices, since vpp w/ plugins now exceeds 255 graph nodes Change-Id: Ic48cad676fa3a6116413ddf08c083dd9660783f1 Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-19VCL-LDPRELOAD: fix iperf3 socket_test.shDave Wallace2-35/+114
Change-Id: Ib6b52917af717d3341429163fb9ecc903cf717fb Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-18LISP: fix crash when sending NSH map-request message, ONE-32Filip Tehlar1-0/+3
Change-Id: Ief8c3d3bec116e9f884981fb52af528f98b5f6ff Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-10-18Plugin for IP-Address to Interface PuntingPierre Pfister7-0/+872
This plugin provides per-ip address to interface punting. When at least one rule is defined, the plugin receives all packets which destination is one of VPP's address but which was not processed by VPP (e.g., a TCP packet on a port that is not open, or a packet for a protocol which is not attached). Based on the set of configured rules, the destination address of each packet is used to send the packet on the associated interface. This plugin allows multiple containers to use VPP's TCP stack (or other features provided by VPP) while still being able to receive additional packets. Change-Id: I3e69bb7d98183bf5163cb9ecb564cb482de252ce Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-10-18VPP-930: add missing ntohl to send_ip6_fib_details(...)Dave Barach1-1/+1
Change-Id: I0c1671f3eaf2dad084e3ac9fb124c9ed78273f50 Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-18ipsec: use boolean or vs. bitwise or to avoid compiler errorAndrew Yourtchenko2-6/+6
Ubuntu 17.04, gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2), "make build" fails with the few of the errors below: error: suggest parentheses around comparison in operand of ‘|’ [-Werror=parentheses] is_aead = (sa0->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_128 | Solution: use the logical rather than the bitwise or. Change-Id: Iffcc1ed2e68b14b248159cb117593d32c623c553 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-10-18CSIT-844: fix binary api rx pthread heap push/popDave Barach4-7/+41
We need to push/pop the rx pthread's heap without affecting other thread(s). Search clib_per_cpu_mheaps, locate an unused slot. Duplicate the main thread heap pointer in that slot, and set __os_thread_index appropriately. Miscellaneous cleanups. Print exec_inband results as a vector, instead of as a format string. Don't bail out of vpp_api_test with results pending, e.g. at the end of a vpp_api_test script. Even though vpp will eventuallly garbage-collect them, We don't want to leave allocated reply messages lurking in the api message allocation rings... Change-Id: I0e8a25d1ff0d3700249dc330d079db16c2fcbc55 Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-17session: fix connect corner case crash.Dave Wallace1-17/+20
Change-Id: I54ced42749432335183ee3085a9ccc5f95a87ae9 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-17VPP-1032: fix coverity warningsDave Barach3-14/+25
Change-Id: Ic3a0c51e5408921051deaf2e50372d9654574b27 Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-17Add API versioning to GENEVE tunnel implementation.Marco Varlese1-1/+3
Change-Id: I5974e5545d74af53c27938c8cdbae12745c38a54 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-10-17session: return local transport endpoint in connect replyFlorin Coras4-1/+20
Change-Id: I7794d5a0774017da4c1c15f45783a18754994ac8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-16session: fix build when debugging is onFlorin Coras3-3/+3
Change-Id: I193832a0cd0557fffc034a1223f67fa64a4d45ae Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-16udp: refactor udp codeFlorin Coras40-1243/+1941
Change-Id: I44d5c9df7c49b8d4d5677c6d319033b2da3e6b80 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-16DNS name resolver improvementsDave Barach4-31/+217
- Cache intermediate CNAME records - Bug fixes Change-Id: I06dcb558212fc5e9434281493c872577cf9b83e1 Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-16LISP: fix map-request counters, ONE-25Filip Tehlar1-6/+5
Change-Id: I198f58a84c4692408f9205052af24ee22df7aeaa Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-10-16jvpp: stop plugin intialization on first mismatchMarek Gradzki9-12/+15
Java bindings use get_message_id from jvpp-common to detect if messages known at compile time are avaliable at runtime. In case of missing entry, Java exception is propagated via JNI using (*env)->ThrowNew. But this function does not end code execution so, in order to prevent unexpected behaviour (e.g. calling vl_msg_api_set_handlers with id == 0), get_message_id caller should do it manually. Change-Id: I2edb5013fd3658dcdd77a867b5cdf62e559ee071 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-10-16lb plugin - fix format() type mismatchesGabriel Ganne1-2/+3
* (vip - lbm->vips) is u64; change format from [%u] to [%lu] * vip->plen is u8, but format looks for u32; add exlicit cast (this cast was done implicitely) On ARM platforms, these prevent a loop in the second call to format_white_space() which would get an invalid (huge) indent value; the result *looked like* an infinite loop. Change-Id: I675ef2f98e4ba3d9e8aef12022d38b1d22981da8 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-10-15VCL/LDPRELOAD: getpeername and getsocknameSteven1-12/+29
Add support for getpeername and getsockname system calls Change-Id: Ie22787b967bb2a5fead0f5fcffd779e4f39b3302 Signed-off-by: Steven <sluong@cisco.com>
2017-10-15Fix minor issues in clib_spinlock_unlock()Dave Barach1-1/+3
Change-Id: I20ce799c9dd57332c06003b466ee7c36169bce98 Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-15ip: avoid arp assert if out of buffers (VPP-1030)Florin Coras1-0/+4
Change-Id: Ia31b978c6c1619c3e0075a84fcbbb6ccbf1c0076 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-15Revert "Enforce FIB table creation before use"Florin Coras6-14/+97
This reverts commit f9342023c19887da656133e2688a90d70383b0c5. Reverting to unblock master. No idea why jjb +1ed this patch! On closer inspection it looks like it -1ed it and subsequently changed opinion. CSIT tests should be fixed before re-merging. Change-Id: I26608912a962c52083073e16c7c9d2cc44a3cc8d Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-14NAT: fix delete of sessions for 1:1 NAT if 1 worker (VPP-1023)Matus Fabian1-1/+1
Change-Id: I2446c646de7f227f9438dd7ef93a455ba5af0102 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-10-14change format_get_indent() to use u32 instead of uwordGabriel Ganne6-7/+8
This follows commit d3c008d108aa2187d1a2afe2833b4de25ca2c2ab by Christophe Fontaine. Change-Id: I0c4df40df44be2ac0ab25817fa050a1f619eca4d Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-10-14Add API call to set keys on IPsec tunnel intfMatthew Smith3-0/+152
There was already a CLI command and a libvnet function to set the keys on an existing IPsec tunnel interface. Expose this via the API. Change-Id: I226a9616f680fc022f04447177a2e8232690657f Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-10-14Source Lookup progammable via APINeale Ranns9-12/+85
Change-Id: I5d5d4f22b6369d504455a644f73076d772fbcfb4 Signed-off-by: Neale Ranns <nranns@cisco.com>