|
@@ -1180,15 +1180,13 @@ static int parse_nat(const struct nlattr *attr,
|
|
int type = nla_type(a);
|
|
int type = nla_type(a);
|
|
|
|
|
|
if (type > OVS_NAT_ATTR_MAX) {
|
|
if (type > OVS_NAT_ATTR_MAX) {
|
|
- OVS_NLERR(log,
|
|
|
|
- "Unknown NAT attribute (type=%d, max=%d).\n",
|
|
|
|
|
|
+ OVS_NLERR(log, "Unknown NAT attribute (type=%d, max=%d)",
|
|
type, OVS_NAT_ATTR_MAX);
|
|
type, OVS_NAT_ATTR_MAX);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
if (nla_len(a) != ovs_nat_attr_lens[type][ip_vers]) {
|
|
if (nla_len(a) != ovs_nat_attr_lens[type][ip_vers]) {
|
|
- OVS_NLERR(log,
|
|
|
|
- "NAT attribute type %d has unexpected length (%d != %d).\n",
|
|
|
|
|
|
+ OVS_NLERR(log, "NAT attribute type %d has unexpected length (%d != %d)",
|
|
type, nla_len(a),
|
|
type, nla_len(a),
|
|
ovs_nat_attr_lens[type][ip_vers]);
|
|
ovs_nat_attr_lens[type][ip_vers]);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -1198,9 +1196,7 @@ static int parse_nat(const struct nlattr *attr,
|
|
case OVS_NAT_ATTR_SRC:
|
|
case OVS_NAT_ATTR_SRC:
|
|
case OVS_NAT_ATTR_DST:
|
|
case OVS_NAT_ATTR_DST:
|
|
if (info->nat) {
|
|
if (info->nat) {
|
|
- OVS_NLERR(log,
|
|
|
|
- "Only one type of NAT may be specified.\n"
|
|
|
|
- );
|
|
|
|
|
|
+ OVS_NLERR(log, "Only one type of NAT may be specified");
|
|
return -ERANGE;
|
|
return -ERANGE;
|
|
}
|
|
}
|
|
info->nat |= OVS_CT_NAT;
|
|
info->nat |= OVS_CT_NAT;
|
|
@@ -1245,13 +1241,13 @@ static int parse_nat(const struct nlattr *attr,
|
|
break;
|
|
break;
|
|
|
|
|
|
default:
|
|
default:
|
|
- OVS_NLERR(log, "Unknown nat attribute (%d).\n", type);
|
|
|
|
|
|
+ OVS_NLERR(log, "Unknown nat attribute (%d)", type);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if (rem > 0) {
|
|
if (rem > 0) {
|
|
- OVS_NLERR(log, "NAT attribute has %d unknown bytes.\n", rem);
|
|
|
|
|
|
+ OVS_NLERR(log, "NAT attribute has %d unknown bytes", rem);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
if (!info->nat) {
|
|
if (!info->nat) {
|