swh:1:snp:32555a3fd8878f019c2ebd6c964bc1edcaeff337
Raw File
Tip revision: e21a712a9685488f5ce80495b37b9fdbe96c230d authored by Linus Torvalds on 05 August 2019, 01:40:12 UTC
Linux 5.3-rc3
Tip revision: e21a712
nf_reject.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _NF_REJECT_H
#define _NF_REJECT_H

static inline bool nf_reject_verify_csum(__u8 proto)
{
	/* Skip protocols that don't use 16-bit one's complement checksum
	 * of the entire payload.
	 */
	switch (proto) {
		/* Protocols with other integrity checks. */
		case IPPROTO_AH:
		case IPPROTO_ESP:
		case IPPROTO_SCTP:

		/* Protocols with partial checksums. */
		case IPPROTO_UDPLITE:
		case IPPROTO_DCCP:

		/* Protocols with optional checksums. */
		case IPPROTO_GRE:
			return false;
	}
	return true;
}

#endif /* _NF_REJECT_H */
back to top