stn-plugin: do not assume all punted packets start with L3 header. 07/9507/2
authorAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 21 Nov 2017 13:37:43 +0000 (14:37 +0100)
committerDave Barach <openvpp@barachs.net>
Tue, 21 Nov 2017 15:36:49 +0000 (15:36 +0000)
commitc59a668da538c902bd49e5900e3fbf4ae36f5a4b
treeb0f2a1ef9bed2321573f75413c0facdc6c87563c
parent70d44d347a58caef0a4417bdc587a37b0a638783
stn-plugin: do not assume all punted packets start with L3 header.

Some punt scenarios (notably, involving DNS traffic)
do not have the current_data set to the L3 header -
as a result, chaos ensues. To tackle this, approach
the parsing from the other side, and look at
the hopefully remaining ethernet header
to see whether the packet is IPv4 or IPv6.

Verified the STN'ed TCP traffic continues to work,
and that the STN'ed DNS traffic starts to work as well.

Change-Id: I0aa2ad1df2fb23dd4e54a564714103b19114d636
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
src/plugins/stn/stn.c