summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipvs/ip_vs_proto.c
diff options
context:
space:
mode:
authorJulian Anastasov2008-04-29 12:21:23 +0200
committerDavid S. Miller2008-04-29 12:21:23 +0200
commit2ad17defd596ca7e8ba782d5fc6950ee0e99513c (patch)
treefa971402d7e832c3dcfa4bb2dd401b76f5249a58 /net/ipv4/ipvs/ip_vs_proto.c
parentbridge: kernel panic when unloading bridge module (diff)
downloadkernel-qcow2-linux-2ad17defd596ca7e8ba782d5fc6950ee0e99513c.tar.gz
kernel-qcow2-linux-2ad17defd596ca7e8ba782d5fc6950ee0e99513c.tar.xz
kernel-qcow2-linux-2ad17defd596ca7e8ba782d5fc6950ee0e99513c.zip
ipvs: fix oops in backup for fwmark conn templates
Fixes bug http://bugzilla.kernel.org/show_bug.cgi?id=10556 where conn templates with protocol=IPPROTO_IP can oops backup box. Result from ip_vs_proto_get() should be checked because protocol value can be invalid or unsupported in backup. But for valid message we should not fail for templates which use IPPROTO_IP. Also, add checks to validate message limits and connection state. Show state NONE for templates using IPPROTO_IP. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_proto.c')
-rw-r--r--net/ipv4/ipvs/ip_vs_proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ipvs/ip_vs_proto.c b/net/ipv4/ipvs/ip_vs_proto.c
index dde28a250d92..4b1c16cbb16b 100644
--- a/net/ipv4/ipvs/ip_vs_proto.c
+++ b/net/ipv4/ipvs/ip_vs_proto.c
@@ -148,7 +148,7 @@ const char * ip_vs_state_name(__u16 proto, int state)
struct ip_vs_protocol *pp = ip_vs_proto_get(proto);
if (pp == NULL || pp->state_name == NULL)
- return "ERR!";
+ return (IPPROTO_IP == proto) ? "NONE" : "ERR!";
return pp->state_name(state);
}