Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11583438 authored by Liping Zhang's avatar Liping Zhang Committed by Pablo Neira Ayuso
Browse files

netfilter: nft_fib: convert htonl to ntohl properly



Acctually ntohl and htonl are identical, so this doesn't affect
anything, but it is conceptually wrong.

Signed-off-by: default avatarLiping Zhang <zlpnobody@gmail.com>
Acked-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent ae0ac0ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ nft_fib4_select_ops(const struct nft_ctx *ctx,
	if (!tb[NFTA_FIB_RESULT])
		return ERR_PTR(-EINVAL);

	result = htonl(nla_get_be32(tb[NFTA_FIB_RESULT]));
	result = ntohl(nla_get_be32(tb[NFTA_FIB_RESULT]));

	switch (result) {
	case NFT_FIB_RESULT_OIF:
+1 −1
Original line number Diff line number Diff line
@@ -235,7 +235,7 @@ nft_fib6_select_ops(const struct nft_ctx *ctx,
	if (!tb[NFTA_FIB_RESULT])
		return ERR_PTR(-EINVAL);

	result = htonl(nla_get_be32(tb[NFTA_FIB_RESULT]));
	result = ntohl(nla_get_be32(tb[NFTA_FIB_RESULT]));

	switch (result) {
	case NFT_FIB_RESULT_OIF:
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ int nft_fib_init(const struct nft_ctx *ctx, const struct nft_expr *expr,
	if ((priv->flags & (NFTA_FIB_F_SADDR | NFTA_FIB_F_DADDR)) == 0)
		return -EINVAL;

	priv->result = htonl(nla_get_be32(tb[NFTA_FIB_RESULT]));
	priv->result = ntohl(nla_get_be32(tb[NFTA_FIB_RESULT]));
	priv->dreg = nft_parse_register(tb[NFTA_FIB_DREG]);

	switch (priv->result) {