From: Justin Pettit Date: Fri, 2 Jan 2009 19:04:21 +0000 (-0800) Subject: Correct VERIFY_NUL_STRING back-port that required a "0" instead of a null. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1cc04c21b0fea06d603da4bc4eeef75bafa8062;p=openvswitch Correct VERIFY_NUL_STRING back-port that required a "0" instead of a null. The VERIFY_NUL_STRING back-port to older kernels was looking for an ASCII zero instead of the null-string terminator. --- diff --git a/datapath/linux-2.6/compat-2.6/include/net/netlink.h b/datapath/linux-2.6/compat-2.6/include/net/netlink.h index 0be53157..e0d594d7 100644 --- a/datapath/linux-2.6/compat-2.6/include/net/netlink.h +++ b/datapath/linux-2.6/compat-2.6/include/net/netlink.h @@ -9,7 +9,7 @@ static inline int VERIFY_NUL_STRING(struct nlattr *attr) { return (!attr || (nla_len(attr) - && memchr(nla_data(attr), '0', nla_len(attr))) + && memchr(nla_data(attr), '\0', nla_len(attr))) ? 0 : EINVAL); } #else