datapath: supply a dummy err_handler of gre_cisco_protocol to prevent kernel crash
authorWei Zhang <asuka.com@163.com>
Sat, 5 Apr 2014 23:17:35 +0000 (16:17 -0700)
committerJesse Gross <jesse@nicira.com>
Wed, 9 Apr 2014 00:44:46 +0000 (17:44 -0700)
commit14e89a8d277e2d02762a087938443fda50418ecb
treee24b50526ae14b51dc384e39a29fe56b4ea39fb0
parent9b0008b516664d6e73cff907c1f6f0e077806c55
datapath: supply a dummy err_handler of gre_cisco_protocol to prevent kernel crash

When use gre vport, openvswitch register a gre_cisco_protocol but
does not supply a err_handler with it. The gre_cisco_err() in
net/ipv4/gre_demux.c expect err_handler be provided with the
gre_cisco_protocol implementation, and call ->err_handler() without
existence check, cause the kernel crash.

This patch provide a err_handler to fix this bug.

Signed-off-by: Wei Zhang <asuka.com@163.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/linux/compat/include/net/gre.h
datapath/vport-gre.c