root/include/net/netfilter/nf_reject.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. nf_reject_verify_csum

   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 #ifndef _NF_REJECT_H
   3 #define _NF_REJECT_H
   4 
   5 #include <linux/types.h>
   6 #include <uapi/linux/in.h>
   7 
   8 static inline bool nf_reject_verify_csum(__u8 proto)
   9 {
  10         /* Skip protocols that don't use 16-bit one's complement checksum
  11          * of the entire payload.
  12          */
  13         switch (proto) {
  14                 /* Protocols with other integrity checks. */
  15                 case IPPROTO_AH:
  16                 case IPPROTO_ESP:
  17                 case IPPROTO_SCTP:
  18 
  19                 /* Protocols with partial checksums. */
  20                 case IPPROTO_UDPLITE:
  21                 case IPPROTO_DCCP:
  22 
  23                 /* Protocols with optional checksums. */
  24                 case IPPROTO_GRE:
  25                         return false;
  26         }
  27         return true;
  28 }
  29 
  30 #endif /* _NF_REJECT_H */

/* [<][>][^][v][top][bottom][index][help] */