Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe-x86
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomaixenomai
  • ipipe-x86
  • Repository
Switch branch/tag
  • ipipe-x86
  • net
  • sctp
  • outqueue.c
Find file BlameHistoryPermalink
  • Marcelo Ricardo Leitner's avatar
    sctp: fix the handling of SACK Gap Ack blocks · a3007446
    Marcelo Ricardo Leitner authored Sep 20, 2016
    
    
    sctp_acked() is using 32bit arithmetics on 16bits vars, via TSN_lte()
    macros, which is weird and confusing.
    
    Once the offset to ctsn is calculated, all wrapping is already handled
    and thus to verify the Gap Ack blocks we can just use pure
    less/big-or-equal than checks.
    
    Also, rename gap variable to tsn_offset, so it's more meaningful, as
    it doesn't point to any gap at all.
    
    Even so, I don't think this discrepancy resulted in any practical bug.
    
    This patch is a preparation for the next one, which will introduce
    typecheck() for TSN_lte() macros and would cause a compile error here.
    
    Suggested-by: default avatarDavid Laight <David.Laight@ACULAB.COM>
    Reported-by: default avatarDavid Laight <David.Laight@ACULAB.COM>
    Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a3007446

Imprint & Privacy Policy