summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/l2tp/l2tp.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-739/+0
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-11feature: convert all feature nodes to new feature infraDamjan Marion1-16/+2
Change-Id: I34c527ba910fb282a95458b78d1d684eb337905e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-01config: rename ip_config_main_t to vnet_feature_config_main_tDamjan Marion1-1/+1
It will not be used for IP only... Change-Id: I90ef3030aff7f9e24767553f019cabc1ea987126 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-14FIB2.0: Adjacency complete pull model (VPP-487)Neale Ranns1-16/+2
Change the adjacency completion model to pull not push. A complete adjacency has a rewirte string, an incomplete one does not. the re-write string for a peer comes either from a discovery protocol (i.e. ARP/ND) or can be directly derived from the link type (i.e. GRE tunnels). Which method it is, is interface type specific. For each packet type sent on a link to a peer there is a corresponding adjacency. For example, if there is a peer 10.0.0.1 on Eth0 and we need to send to it IPv4 and MPLS packets, there will be two adjacencies; one for the IPv4 and one for the MPLS packets. The adjacencies are thus distinguished by the packets the carry, this is known as the adjacency's 'link-type'. It is not an L3 packet type, since the adjacency can have a link type of Ethernet (for L2 over GRE). The discovery protocols are not aware of all the link types required - only the FIB is. the FIB will create adjacencies as and when they are required, and it is thus then desirable to 'pull' from the discovery protocol the re-write required. The alternative (that we have now) is that the discovery protocol pushes (i.e. creates) adjacencies for each link type - this creates more adjacencies than we need. To pull, FIB now requests from the interface-type to 'complete' the adjacency. The interface can then delegate to the discovery protocol (on ethernet links) or directly build the re-write (i.e on GRE). Change-Id: I61451789ae03f26b1012d8d6524007b769b6c6ee Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-08-19VPP-337 Add per interface IN filteringDave Barach1-1/+2
- ip post-rewrite feature subgraph arc support Change-Id: Ia4b07197463021ade916326231af246e2559a290 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-17Coding standards cleanup - remove trailing whitespace, fixes VPP-332Damjan Marion1-17/+17
Change-Id: I649a17f8fa47599faf438b2e596f53761790d10c Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-16VPP-258: Style change for l2tpCalvin1-291/+325
Change-Id: Ib456558974820d8d45114b2bbad014a3a3aa2d21 Signed-off-by: Calvin <calvin.ference@gmail.com> Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-20L2TP: Add option for custom fib id for outgoing encapsulated packetsPierre Pfister1-1/+19
If a custom fib ID is used (different from ~0), the associated fib is used to forward outgoing encapsulated packets. Otherwise, the fib used is the same as for any packet received on the original RX interface (L2TP does not modify RX interface index). Change-Id: I4533d5f7fa432c78c937d3acdd802d0d1c92a0c7 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-24Add admin-up flag to L2TP tunnels and start tunnels set to downPierre Pfister1-3/+20
L2TP tunnels use virtual interfaces but directly send packets to l2-input node (not ethernet-input). This node requires a bridge-domain to be associated with the interface. Past code was immediatly turning the interface up, but some packets could be sent to l2-input without bridge domain between interface creation and association with a bridge domain. The tunnel is now created as down and has to be set up later (typically after being associated with a bridge-domain). Another option would have been to change the api and enforce a bridge-domain to be specified before the tunnel, but this is less flexible for the user. Change-Id: I26d1f36bb4f327d9fa1c8044023f2210c4117904 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-20VPP-143: Correctly drop local l2tp packets when no session is foundPierre Pfister1-1/+1
When receiving a local ipv6 packet containing an l2tp packet not associated with any session, l2tp node was handling the packet as if provided by an ipv6 feature, hence crashing. This patch fixes the issue by correctly dropping the packet instead. This patch also fixes a typo from commit d65346098daf896. Change-Id: I1b377fc5685568c16831920227671feffac64287 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-17Dynamically compute ip feature subgraph orderDave Barach1-3/+3
This change-set enables plugins to add themselves to the ip4/ip6 feature subgraphs without having to modify core vpp engine code at all. Add VNET_IP4/IP6_UNICAST/MULTICAST_FEATURE_INIT macros which express the required ordering constraints, and off you go. Along the way, added an implementation of Warshall's algorithm to vppinfra; to compute the positive transitive closure of a relation. In this case, the relation is "feature A runs before feature B." With that in hand, ip_feature_init_cast(...) computes a partial order across the set of configured feature subgraph nodes. In unit-testing, we discovered VPP-145 - ip4/6 inacl wiped out vnet_buffer(b)->ip>current_config_index, which exists in main. So, we fixed that by moving b->trace_index, adding b->current_config_index, and removing the ip opaque union current_config_index. Change-Id: Iff132116f66413dc6b31ac3377198c7a32d51f48 Signed-off-by: Dave Barach <dave@barachs.net>
2016-05-23VPP-81: Print interface name after creating an interface with CLIPierre Pfister1-0/+1
When the CLI is used to create an interface, and whend the operation succeeds, the newly created interface name is printed-out. The patch includes the following interfaces types: - AF_PACKET - Vhost User - Netmap - GRE - L2TP - MPLS-GRE - Loopback Change-Id: Id518c139ec63a261eae81d2ed95c4cd1f10b5157 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-04-22Add clib_memcpy macro based on DPDK rte_memcpy implementationDamjan Marion1-4/+4
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854 Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-18Fix warnings/errors reported by clangDamjan Marion1-1/+1
Change-Id: Ifb2de64347526e3218e22067452f249ff878fd32 Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke1-0/+696
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>