tunnel: Validate IP header for userspace tunneling.
authorJesse Gross <jesse@nicira.com>
Fri, 11 Sep 2015 16:01:05 +0000 (09:01 -0700)
committerJesse Gross <jesse@nicira.com>
Sun, 13 Sep 2015 15:13:11 +0000 (08:13 -0700)
commitf41256d709d1733262b7538613237b34e801f457
treefb6100bbd18d8995d749cf8585b1204aa1631846
parent9d4aeccaf69861616cb0715d10e3f1f3e2a14e51
tunnel: Validate IP header for userspace tunneling.

Currently, when doing userspace tunneling we don't perform much in
the way of integrity checks on the incoming IP header. The case of
tunneling is different from the usual case of switching since we are
acting as the endpoint here and should not allow invalid packets to
pass.

This adds checks for IP checksum, version, total length, and options and
drops packets that don't pass.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
lib/netdev-vport.c
tests/tunnel-push-pop.at