diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-02 21:44:27 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-02 21:50:40 -0600 |
commit | ad2027ae26e5d83eb42c9edaa90f7b278f9b0d3d (patch) | |
tree | 696c1d8bca3c8a7b29aa89ec0763b2e2e5c850eb /lib9p/types.c | |
parent | 06ab37743a3a657178a17d56252794073c00342b (diff) |
lib9p: Exclude the MOUNT bit from masks, align masks
Diffstat (limited to 'lib9p/types.c')
-rw-r--r-- | lib9p/types.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib9p/types.c b/lib9p/types.c index 2d0bb1b..baddab3 100644 --- a/lib9p/types.c +++ b/lib9p/types.c @@ -347,9 +347,9 @@ static ALWAYS_INLINE bool validate_dm(struct _validate_ctx *ctx) { if (validate_4(ctx)) return true; static const lib9p_dm_t masks[LIB9P_VER_NUM] = { - [LIB9P_VER_9P2000] = 0b11111100000000000000000111111111, - [LIB9P_VER_9P2000_e] = 0b11111100000000000000000111111111, - [LIB9P_VER_9P2000_u] = 0b11111100101111000000000111111111, + [LIB9P_VER_9P2000] = 0b11101100000000000000000111111111, + [LIB9P_VER_9P2000_e] = 0b11101100000000000000000111111111, + [LIB9P_VER_9P2000_u] = 0b11101100101111000000000111111111, }; lib9p_dm_t mask = masks[ctx->ctx->version]; lib9p_dm_t val = decode_u32le(&ctx->net_bytes[ctx->net_offset-4]); @@ -363,9 +363,9 @@ static ALWAYS_INLINE bool validate_qt(struct _validate_ctx *ctx) { if (validate_1(ctx)) return true; static const lib9p_qt_t masks[LIB9P_VER_NUM] = { - [LIB9P_VER_9P2000] = 0b11111100, - [LIB9P_VER_9P2000_e] = 0b11111100, - [LIB9P_VER_9P2000_u] = 0b11111110, + [LIB9P_VER_9P2000] = 0b11101100, + [LIB9P_VER_9P2000_e] = 0b11101100, + [LIB9P_VER_9P2000_u] = 0b11101110, }; lib9p_qt_t mask = masks[ctx->ctx->version]; lib9p_qt_t val = decode_u8le(&ctx->net_bytes[ctx->net_offset-1]); |