diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-02 13:22:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-02 13:22:37 +0000 |
commit | f75d8632c7145c04538e7b9c4d29fd9919663467 (patch) | |
tree | d4a685a768602a1351c83b4e76551d26f18ad4fe /sys/net | |
parent | f05aac487e17edc6860ce2f447de9eb34ccafaad (diff) |
Repair state and flag bitmasks to match RFC, from Mitchell Krome
ok claudio
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/bfd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/bfd.c b/sys/net/bfd.c index 15b2a970a74..42995531a8a 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.76 2019/05/28 18:39:06 kn Exp $ */ +/* $OpenBSD: bfd.c,v 1.77 2019/06/02 13:22:36 deraadt Exp $ */ /* * Copyright (c) 2016-2018 Peter Hessler <phessler@openbsd.org> @@ -90,8 +90,8 @@ struct bfd_auth_header { #define BFD_VERSION 1 /* RFC 5880 Page 6 */ #define BFD_VER(x) (((x) & 0xe0) >> 5) #define BFD_DIAG(x) ((x) & 0x1f) -#define BFD_STATE(x) (((x) & 0xf0) >> 6) -#define BFD_FLAGS(x) ((x) & 0x0f) +#define BFD_STATE(x) (((x) & 0xc0) >> 6) +#define BFD_FLAGS(x) ((x) & 0x3f) #define BFD_HDRLEN 24 /* RFC 5880 Page 37 */ #define BFD_AUTH_SIMPLE_LEN 16 + 3 /* RFC 5880 Page 10 */ #define BFD_AUTH_MD5_LEN 24 /* RFC 5880 Page 11 */ |