summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-11-17 16:01:11 +0100
committerPhil Sutter <phil@nwl.cc>2022-11-24 10:24:06 +0100
commitc4fc6440a6f39606e38744bfc827852bb68829f4 (patch)
tree0642ab5fe314eac65bd3d5833efd2c9bb5fecc6e /extensions
parente6747f6b1098b2bc7dfd482f287b3f90b351f164 (diff)
extensions: MARK: Sanitize MARK_xlate()
Since markinfo->mode might contain unexpected values, add a default case returning zero. Fixes: afefc7a134ca0 ("extensions: libxt_MARK: Add translation for revision 1 to nft") Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libxt_MARK.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/libxt_MARK.c b/extensions/libxt_MARK.c
index 1536563d..100f6a38 100644
--- a/extensions/libxt_MARK.c
+++ b/extensions/libxt_MARK.c
@@ -366,6 +366,8 @@ static int MARK_xlate(struct xt_xlate *xl,
case XT_MARK_OR:
xt_xlate_add(xl, "mark or 0x%x ", (uint32_t)markinfo->mark);
break;
+ default:
+ return 0;
}
return 1;