mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-12 04:13:55 +00:00
tcp: fixed TCPH_UNSET_FLAG macro
This macro is only used by VJ support in PPP and was always wrong since its introduction in commit e4a6d199fe. It's almost only used to clear the PSH TCP flag when necessary. This flag was probably less common about a decade ago so that would be the reason why it goes unnoticed for so long. Fixes: e4a6d199fe "Merged from DEVEL into main tree." Signed-off-by: Sylvain Rochet <gradator@gradator.net>
This commit is contained in:
parent
90df2111b7
commit
733758a909
@ -186,7 +186,7 @@ PACK_STRUCT_END
|
||||
#define TCPH_HDRLEN_FLAGS_SET(phdr, len, flags) (phdr)->_hdrlen_rsvd_flags = htons(((len) << 12) | (flags))
|
||||
|
||||
#define TCPH_SET_FLAG(phdr, flags ) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags | htons(flags))
|
||||
#define TCPH_UNSET_FLAG(phdr, flags) (phdr)->_hdrlen_rsvd_flags = htons(ntohs((phdr)->_hdrlen_rsvd_flags) | (TCPH_FLAGS(phdr) & ~(flags)) )
|
||||
#define TCPH_UNSET_FLAG(phdr, flags) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags & ~htons(flags))
|
||||
|
||||
#define TCP_TCPLEN(seg) ((seg)->len + (((TCPH_FLAGS((seg)->tcphdr) & (TCP_FIN | TCP_SYN)) != 0) ? 1U : 0U))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user