aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/ipsec/esp_decrypt.c
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2018-11-05 13:29:25 +0200
committerJohn Lo <loj@cisco.com>2018-11-20 02:52:39 +0000
commitd3d424180fcd98561d656d5c2189e9e59ef2b2b9 (patch)
treea9288e7e960b97072de833fb3453303c1d242198 /src/plugins/dpdk/ipsec/esp_decrypt.c
parentc7b03fe8f3fd2753d97ffdf8e7ebd85e2c527085 (diff)
dhcp4:(VPP-1483) linearize chained packets before handling
dhcp packets might (when flooded) arrive in chains of cloned buffers Change-Id: Ifddecd656b6a5d6ba8cd94184f5c021684e35548 Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/ipsec/esp_decrypt.c')
0 files changed, 0 insertions, 0 deletions
tring.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/env python3

import unittest

from scapy.layers.l2 import Ether
from scapy.layers.inet6 import IPv6

from framework import tag_fixme_vpp_workers
from framework import VppTestCase


@tag_fixme_vpp_workers
class TestL2tp(VppTestCase):
    """L2TP Test Case"""

    @classmethod
    def setUpClass(cls):
        super(TestL2tp, cls).setUpClass()

        cls.create_pg_interfaces(range(1))
        cls.pg0.admin_up()
        cls.pg0.config_ip6()

    def test_l2tp_decap_local(self):
        """L2TP don't accept packets unless configured"""

        pkt = Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) / IPv6(
            src=self.pg0.remote_ip6, dst=self.pg0.local_ip6, nh=115
        )

        self.pg0.add_stream(pkt)
        self.pg_start()

        # l2tp should not accept packets
        err = self.statistics.get_counter(
            "/err/l2tp-decap-local/l2tpv3 session not found"
        )[0]
        self.assertEqual(err, 0)
        err_count = err

        self.vapi.l2tpv3_create_tunnel(
            client_address=self.pg0.local_ip6, our_address=self.pg0.remote_ip6
        )

        self.pg0.add_stream(pkt)
        self.pg_start()

        # l2tp accepts packets
        err = self.statistics.get_counter(
            "/err/l2tp-decap-local/l2tpv3 session not found"
        )[0]
        self.assertEqual(err, 1)
        err_count = err