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>
Sat, 5 Apr 2014 23:18:23 +0000 (16:18 -0700)
commit43f31ef528f5e4b4751036ce2ef90ea1334bbe3f
tree5c950cc10f565e9875606b5b60fccec6c81ad4e2
parent6d616e9906220496ab7613cd5135209442adcb4b
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