[PATCH nft 3/7] netlink: BUG when object type is unknown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This will only trigger during development when adding new object types to
the parser.

The BUG() gives a clear hint where the serialization code needs to go.

Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
---
 src/netlink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/netlink.c b/src/netlink.c
index 1f3398225892..d2ede2a47c5d 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -317,6 +317,9 @@ alloc_nftnl_obj(const struct handle *h, struct obj *obj)
 		nftnl_obj_set_u32(nlo, NFTNL_OBJ_QUOTA_FLAGS,
 				  obj->quota.flags);
 		break;
+	default:
+		BUG("Unknown type %d\n", obj->type);
+		break;
 	}
 	return nlo;
 }
-- 
2.10.2

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux