diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-05-02 14:06:23 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-05-02 16:29:30 +0200 |
commit | 9ddc4362ce64a0b273c2fbcb819fa061aadd02a5 (patch) | |
tree | 766d4b76b931e9d700d4d265d0d4ff2c0c540a59 /src/expect/parse_mnl.c | |
parent | 9c0ed46f68cada9f3455be91adb553d020012596 (diff) |
src: introduce abi_breakage()
Changes in the netlink attribute layout is considered to be a kernel ABI
breakage, so report this immediately and stop execution, instead of lazy
error back to the client application, which cannot do anything with
this.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expect/parse_mnl.c')
-rw-r--r-- | src/expect/parse_mnl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expect/parse_mnl.c b/src/expect/parse_mnl.c index 741b46e..69feef5 100644 --- a/src/expect/parse_mnl.c +++ b/src/expect/parse_mnl.c @@ -26,21 +26,21 @@ static int nlmsg_parse_expection_attr_cb(const struct nlattr *attr, void *data) case CTA_EXPECT_TUPLE: case CTA_EXPECT_MASK: if (mnl_attr_validate(attr, MNL_TYPE_NESTED) < 0) - return MNL_CB_ERROR; + abi_breakage(); break; case CTA_EXPECT_TIMEOUT: case CTA_EXPECT_FLAGS: case CTA_EXPECT_ID: if (mnl_attr_validate(attr, MNL_TYPE_U32) < 0) - return MNL_CB_ERROR; + abi_breakage(); break; case CTA_EXPECT_HELP_NAME: if (mnl_attr_validate(attr, MNL_TYPE_STRING) < 0) - return MNL_CB_ERROR; + abi_breakage(); break; case CTA_EXPECT_ZONE: if (mnl_attr_validate(attr, MNL_TYPE_U16) < 0) - return MNL_CB_ERROR; + abi_breakage(); break; } tb[type] = attr; |