BFD: improve finding of ipv4/ipv6 headers 61/4761/6
authorKlement Sekera <ksekera@cisco.com>
Wed, 18 Jan 2017 08:44:36 +0000 (09:44 +0100)
committerDamjan Marion <dmarion.lists@gmail.com>
Thu, 2 Feb 2017 12:04:30 +0000 (12:04 +0000)
commit402ed3128512efc091a560729ce1e772a86e9f74
treef33301d7ce3d4766f720a034b5b394c5818dcf34
parentad623b1f71f0808916e513437246a0fb36174d5b
BFD: improve finding of ipv4/ipv6 headers

Avoid coverity warning and improve safety by declaring a helper
structure and working with it when searching for ip headers.
Make sure the content following IPv6 header is actually UDP before
parsing it. Bail out if unexpcted IPv6 header found ...

Change-Id: I1c6b9fd42d6fdae226f12c91c53c07a932b29522
Signed-off-by: Klement Sekera <ksekera@cisco.com>
src/vnet/bfd/bfd_udp.c