238 Commits

Author SHA1 Message Date
Matus Fabian
161c59c75c SNAT: in2out translation as an output feature hairpinning (VPP-913)
Change-Id: I3790739683c6090ffb2aefb4758bd4275856c09a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-21 03:46:47 -07:00
Matus Fabian
93d84c9fc2 SNAT: in2out translation as an output feature (VPP-903)
in2out translation as an output feature on the outside interface (postrouting)

Change-Id: I32c0311be09bdf102b9a0885b8b89c7588cb558f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-20 06:56:07 +00:00
Klement Sekera
60c1223acb make test: improve console output messages
Remove the word derp and replace it with a proper, more gramatically
correct message.

Change-Id: I04fd44cc67dace1a31ca48fc8ce67b246162ba79
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-07-18 20:52:47 +00:00
Neale Ranns
51822bf07a DHCP client option 61 "client_id"
the existing seeting of client_id to a VPP version number was unused and so overridden

Change-Id: If9ebea936336f1fcca8d07e67186c95f8f8f0ccd
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-07-18 19:05:03 +00:00
Neale Ranns
a2fbf6ba0e DHCP client - remove interface address when DHCP de-configured
Change-Id: I63c59e3c13859b51999d283774f7783ef0a6a5ed
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-07-18 19:01:00 +00:00
Eyal Bari
758137a7b7 TEST:add l2bd nd term tests
Change-Id: I67633175d50a70a0b8ae4f85c659b93070f8e1fb
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-18 15:02:29 +00:00
Matus Fabian
7968e6cad5 SNAT: Fallback to 3-tuple key for non TCP/UDP sessions (VPP-884)
Change-Id: I4868ff6e81c579b29d3ea066976ae145f8b83e9e
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-07 07:04:42 +00:00
Eyal Bari
c86e592f9a TEST:add L2BD arp term tests
Change-Id: I42414da9663ecfc8dfe5baf3e6615cf3b9b02e22
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-04 11:57:35 +00:00
Matus Fabian
7c0aecc9e3 SNAT: fix failing test_session_limit_per_user (VPP-896)
Change-Id: Idf46a03803125babd9bb880363686359fbcca27d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 860af5ad2b023f9c57d622a7a9d3bd0099e480b1)
2017-07-03 17:24:19 +00:00
Eyal Bari
31a71ab497 L2-LEARN:fix l2fib entry seq num not updated on hit (VPP-888)
fixed instability in l2bd_multi_instnce test - sometimes failing with extra
packets captured

it appears l2-learn was not updating hit entries but rather a copy of them.

if the ager did not have a chance to run before the test was running the
learning cycle - entries were not updated with the packet's seq num - causing
packets to flood when hitting the stale seq_num in l2-fwd - hence the extra
packets

fixed handling of filter entries

revert workaround for instability in test

Change-Id: I16d918e6310a5bf40bad5b7335b2140c2867cb71
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit 25ff2ea3a31e422094f6d91eab46222a29a77c4b)
2017-06-27 12:44:28 +00:00
Ole Troan
ed92925f4d FLOWPROBE: Add flowstartns, flowendns and tcpcontrolbits
- fixed problem with tcp_flag
- changed flowtimestamp into NTP format
Change-Id: I4ef05d6c69c5c078a0c80d59c5ccb0c85b924ba6
Signed-off-by: Ole Troan <ot@cisco.com>
2017-06-27 12:01:34 +02:00
Andrew Yourtchenko
eb46754ef6 acl-plugin: CLI to clear all sessions
It is useful to have the CLI to clear the existing sessions.
There was a work-in-progress CLI but it did not work properly.
Fix it and split into a separate "clear acl-plugin sessions",
and add a unit test into the extended connection-oriented tests.

Change-Id: I55889165ebcee139841fdac88747390903a05394
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-21 20:31:44 +00:00
Matus Fabian
428dc9110b NAT64: custom prefix
Change-Id: If397b49861468eed29b964fa64b186f80eb0eceb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-21 16:27:41 +00:00
Neale Ranns
ca1936123c ARP: ignore non-connected routes and non-interface sources when determing if source is connected
Change-Id: I39fb0ec44cc322eaa12c0ff0700fc405d3982bfc
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-21 11:49:01 +00:00
Eyal Bari
284293a3ff L2-VTR: add vtr tests
re-enable l2 fib flush tests
reorder l2bd multi instance tests - move flags test as last
enabling of uu-flood will now flood when entry is stale

Change-Id: I052663ec3eb4acee5f296fb7525dd535924e0003
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-06-21 01:29:37 +00:00
Matus Fabian
1e8db5fb6f SNAT: unknow protocol hairpinning fix
Change-Id: I15813167e7c8529f229143de4a8f64f0fb530951
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-20 12:00:19 +00:00
Eyal Bari
0f360dc3aa L2FWD:fix seq_num overwritten + validate l2fib entries when forwarding
l2_classify memeber table_index was overlaid over l2.l2fib_seq_num
which over written when table_index gets initialized in l2_input_classify

solved by overlaying both table_index and opaque_index as only one is used

seperated l2fib seq num from l2_input configs
for better handling of theoretical ABA issue where an entry for a deleted
interface is considered valid by the ager because a different interface with
same sw_if_index and seq_num was created before the ager got a chance to delete

Change-Id: I7b0eeded971627406f1c80834d7e02c0ebe62136
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-06-19 22:24:19 +00:00
Matus Fabian
328dbc886d SNAT: NAT packet with unknown L4 protocol if match 1:1 NAT
Change-Id: Ic81c6098d615fdb6a874e532921efd833fed872c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-19 13:47:19 +00:00
Andrew Yourtchenko
7f4d577d6b acl-plugin: bihash-based ACL lookup
Add a bihash-based ACL lookup mechanism and make it a new default.
This changes the time required to lookup a 5-tuple match
from O(total_N_entries) to O(total_N_mask_types), where
"mask type" is an overall mask on the 5-tuple required
to represent an ACE.

For testing/comparison there is a temporary debug CLI
"set acl-plugin use-hash-acl-matching {0|1}", which,
when set to 0, makes the plugin use the "old" linear lookup,
and when set to 1, makes it use the hash-based lookup.

Based on the discussions on vpp-dev mailing list,
prevent assigning the ACL index to an interface,
when the ACL with that index is not defined,
also prevent deleting an ACL if that ACL is applied.

Also, for the easier debugging of the state, there are
new debug CLI commands to see the ACL plugin state at
several layers:

"show acl-plugin acl [index N]" - show a high-level
ACL representation, used for the linear lookup and
as a base for building the hashtable-based lookup.
Also shows if a given ACL is applied somewhere.

"show acl-plugin interface [sw_if_index N]" - show
which interfaces have which ACL(s) applied.

"show acl-plugin tables" - a lower-level debug command
used to see the state of all of the related data structures
at once. There are specifiers possible, which make
for a more focused and maybe augmented output:

"show acl-plugin tables acl [index N]"
show the "bitmask-ready" representations of the ACLs,
we well as the mask types and their associated indices.

"show acl-plutin tables mask"
show the derived mask types and their indices only.

"show acl-plugin tables applied [sw_if_index N]"
show the table of all of the ACEs applied for a given
sw_if_index or all interfaces.

"show acl-plugin tables hash [verbose N]"
show the 48x8 bihash used for the ACL lookup.

Change-Id: I89fff051424cb44bcb189e3cee04c1b8f76efc28
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-19 11:56:10 +00:00
Matus Fabian
029f3d2c1c NAT64: Hairpinning (VPP-699)
Change-Id: I83a6c277fa211ac2c2ca2d603650c992886af0a7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-19 11:08:47 +00:00
Pavel Kotucek
89111d0403 Flowprobe - tests speed-up
Updated test to reduce tests runtime.

Change-Id: I7904628fc19d349d6c26502e49d4c990cb8816ff
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-06-13 16:05:15 +00:00
Matus Fabian
4b30ceb1b4 SNAT: fix 1:1 NAT without port hairpinning TCP checksum update
Change-Id: I5077fcf3671a6116b475f87e43120efc10ecaa08
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-13 08:19:10 +00:00
Eyal Bari
b823df5a7d L2FIB:fix crash in show with deleted subif entries
after deleting a sub interface it's l2fib entries are left with a dangling
sw_if_index (while waiting for the ager to delete them).
changed "show l2fib" to reflect that state with "Deleted" as the interface name.

added sleep in test_l2_fib as a workaround for packets still passing after flush
will investigate...

Change-Id: Id998d7d3c6a073ef5005c5f3009e1cfb7febf7db
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-06-12 22:52:35 +00:00
Matus Fabian
732036d677 NAT64: ICMP error support
Added ICMP error messages translation.
Added check for multi thread (not supported yet, so init failed).
Added API definition for custom NAT64 refix.

Change-Id: Ice2f04631af63e594aecc09087a1cf59f3b676fb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-09 07:30:14 +00:00
Matus Fabian
06596c54dc NAT64: Add NAT64 support for snat plugin (VPP-699)
Basic NAT64 feature (no hairpinning, no multi-thread).

Change-Id: I392fccbce93e70c117f4a9a7ec7cf08d6c537f2d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-08 11:39:53 +00:00
Klement Sekera
3658adcadc make test: improve debugability
Introduce faulthandler to print stack trace to stderr on python crash.
Don't disable automatic garbage collection to decrease the chances of
running out of memory.

Change-Id: I6927a5f6ea9569735d084d4ed3d258950a400d74
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-06-07 17:03:37 +00:00
Neale Ranns
30d0fd4804 Packets recieved on VLAN-0 map to the main interface
Change-Id: I21b1ad39275495d4d006023b58f630a213445854
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-06 15:37:12 +00:00
Hongjun Ni
8a0a0ae60b Rework vxlan-gpe to support FIB 2.0 and bypass mode
Change-Id: I0324f945bdb4dd3b19151be6f3ce24a47a000104
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-06-06 07:26:00 +00:00
Matus Fabian
6fa74c60ea SNAT: fix ICMP hairpinning
Change-Id: I9d63133bd1db72917571ade868040c4597c896a1
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-05 19:58:35 +00:00
Neale Ranns
c2aad53aa5 IP Mcast - recalculate on interface up/dowm
Change-Id: Ie5b88fd7187ed62218a2e4e0e493c33e3e9ecc2f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-01 17:15:44 +00:00
Klement Sekera
26261594a0 make test: add suddenly missing dependency (six module)
Change-Id: I121eaee6b752a6b3bfe1d5ecf803f67147c77beb
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-06-01 06:11:57 +02:00
Ole Troan
5c749734b1 Flowprobe: Stateful flows and IPv6, L4 recording
Change-Id: I67839281623721bf42f0a918a53356143d9dc78a
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2017-05-30 09:32:07 +00:00
Neale Ranns
6af1c04f92 MPLS lookup DPO does not pop the label (nor does it handle replicate)
Change-Id: I7de6b96631d1645d0eadd38525860d84d78e316d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-26 18:15:31 +00:00
Neale Ranns
dcd6d6254a ARP/ND use path_remove to complement path_add
don't add duplicate extensions.

Change-Id: Icf72d6e1b004d0dda532bec2b51f6b74544925bb
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-26 18:15:14 +00:00
Neale Ranns
71275e3d1e MPLS hash function improvements
Change-Id: I28e98f445c01493562b6196a4f5b532a51f178af
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-25 21:03:11 +00:00
Matus Fabian
6631e9c164 SNAT: fix IPFIX data src and dst port
Change-Id: Ifa9582962710a3601fcccbbf388529043fc7f08a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-05-24 19:49:16 +00:00
Neale Ranns
31426c6fee Missing VLIB node for IPv6 disposition from mcast MPLS LSP
Change-Id: Ibc0e1910a4926fdfbf74571efb5fd5810bfa09da
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-24 19:48:08 +00:00
Neale Ranns
13eaf3e61d Leak locks and tables in the Classifier
Change-Id: Iae04c57bba87ab3665388eadd0805f75171636a5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-24 16:31:53 +00:00
Eyal Bari
521202b445 TEST/L2BD:fix flush tests
flush tests will now enable learning on the bridge, and send broadcast packets
to add dynamic entries to the l2_fib. it will then disable learning, flush, and
will verify packets are not forwarded to flushed "hosts".

Change-Id: Ie6f123e59f6c89af511bdc5a02dd199420c424e9
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-24 15:10:30 +00:00
Neale Ranns
8c4611b391 Labelled attached paths via an MPLS tunnel
Change-Id: Ic86617c9c3217122043656ce2ea70bb106df5b2d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-23 03:44:33 -07:00
Neale Ranns
4b8d3be9f4 Skip L2 FIB flush tests
These tests attempt to flush static entries from a bridge-domain that has no aging configured. for both reasons it will fail.
The fact thtat they occationally pass is due to the fact that the assert_nothing_cpatured does not actually capture packets, so it misses the fact that there are some.

Change-Id: Ie5c98a42944e29a3d482156f7e9246511380372f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-22 02:46:06 -07:00
Matthew Smith
cb9ab47fd3 VPP-719: Accept ARP replies from VRRP hw addr
Check whether an ARP src hw addr starts with 00:00:5e:00:01
before rejecting due to a mismatch between ARP src hw addr
and ethernet frame src addr.

Change-Id: Ia3ecd5d6dba34876aca8d90bc622a0a1397e48fb
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-05-17 13:43:17 +00:00
Neale Ranns
d5b6aa1398 ARP learning fixes (VPP-843)
learn ARP peers if, 1) it's a reply to a local address, 2) we are sending a response to a request.
send proxy ARP responses only in the interface the request was sent.

Change-Id: I22b949c65122824233076492b7dd537daca07bc2
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-17 00:16:24 +00:00
Eyal Bari
93b503e1a4 L2FIB: add flush test
add tests for flush int/bd/all

Change-Id: Ia589ec5925b9c8acbb2fc16dafbf4842aa1a6eff
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-16 15:10:52 +00:00
Hongjun Ni
ef486b1545 Add GTP-U plugin. VPP-694
Basic GTP-U feature

Change-Id: I31226f890a92c5303ac06e112ed7820cae52d9bd
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-05-15 19:34:00 +00:00
Klement Sekera
cd6cb986ed make test: support coverage for out-of-tree plugins
Change-Id: Ibd7828b1e1c699630ff450122d8aa317b1c9da26
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-05-11 06:55:32 +02:00
Eyal Bari
c83c8ed1db L2BD/TEST:fix l2bd multiinstance test
Change-Id: If864182ec656cc6c6353be642e22910a4fc89870
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-10 17:06:44 +00:00
Andrew Yourtchenko
57d7dbc8bf Avoid active connection prevent timeout of idle conns after it
Fix a logic error related to timing out of the connections
following the active one. To avoid this class of issue in
the future, create corresponding testcases, as well as some
trivial sanity testcases for both IPv4 and IPv6.

Since these tests are timing-dependent and take up time,
mark them as extended tests.

Change-Id: I2c72bad5efda7db8aa9cb05801fe47928dc47927
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-05-07 14:31:07 +00:00
Martin Gálik
406eb1df44 SNAT: Additional tests for SNAT interfaces without a configured ip address
Change-Id: I7edea5d7b105ba66e0e04d509968b92cfb64c84a
Signed-off-by: Martin Gálik <magalik@cisco.com>
2017-05-05 11:43:17 +00:00
Klement Sekera
f3bcdbf071 BFD: don't crash if interface is deleted
Instead, drop the BFD session associated with it..

Change-Id: Ie09877d5c94844be2e833900d9dde7f23edaf8cd
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-05-02 19:24:38 +00:00