Module Name: src
Committed By: ozaki-r
Date: Tue Jan 23 02:18:57 UTC 2018
Modified Files:
src/sys/netipsec: ipsec_input.c
Log Message:
KNF: replace soft tabs with hard tabs
To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/netipsec/ipsec_input.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netipsec/ipsec_input.c
diff -u src/sys/netipsec/ipsec_input.c:1.51 src/sys/netipsec/ipsec_input.c:1.52
--- src/sys/netipsec/ipsec_input.c:1.51 Thu Aug 3 06:32:51 2017
+++ src/sys/netipsec/ipsec_input.c Tue Jan 23 02:18:57 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_input.c,v 1.51 2017/08/03 06:32:51 ozaki-r Exp $ */
+/* $NetBSD: ipsec_input.c,v 1.52 2018/01/23 02:18:57 ozaki-r Exp $ */
/* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */
/* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.51 2017/08/03 06:32:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.52 2018/01/23 02:18:57 ozaki-r Exp $");
/*
* IPsec input processing.
@@ -127,49 +127,49 @@ do { \
static struct mbuf *
ipsec4_fixup_checksum(struct mbuf *m)
{
- struct ip *ip;
- struct tcphdr *th;
- struct udphdr *uh;
- int poff, off;
- int plen;
-
- if (m->m_len < sizeof(*ip))
- m = m_pullup(m, sizeof(*ip));
- ip = mtod(m, struct ip *);
- poff = ip->ip_hl << 2;
- plen = ntohs(ip->ip_len) - poff;
-
- switch (ip->ip_p) {
- case IPPROTO_TCP:
- IP6_EXTHDR_GET(th, struct tcphdr *, m, poff, sizeof(*th));
- if (th == NULL)
- return NULL;
- off = th->th_off << 2;
- if (off < sizeof(*th) || off > plen) {
- m_freem(m);
- return NULL;
- }
- th->th_sum = 0;
- th->th_sum = in4_cksum(m, IPPROTO_TCP, poff, plen);
- break;
- case IPPROTO_UDP:
- IP6_EXTHDR_GET(uh, struct udphdr *, m, poff, sizeof(*uh));
- if (uh == NULL)
- return NULL;
- off = sizeof(*uh);
- if (off > plen) {
- m_freem(m);
- return NULL;
- }
- uh->uh_sum = 0;
- uh->uh_sum = in4_cksum(m, IPPROTO_UDP, poff, plen);
- break;
- default:
- /* no checksum */
- return m;
- }
+ struct ip *ip;
+ struct tcphdr *th;
+ struct udphdr *uh;
+ int poff, off;
+ int plen;
+
+ if (m->m_len < sizeof(*ip))
+ m = m_pullup(m, sizeof(*ip));
+ ip = mtod(m, struct ip *);
+ poff = ip->ip_hl << 2;
+ plen = ntohs(ip->ip_len) - poff;
+
+ switch (ip->ip_p) {
+ case IPPROTO_TCP:
+ IP6_EXTHDR_GET(th, struct tcphdr *, m, poff, sizeof(*th));
+ if (th == NULL)
+ return NULL;
+ off = th->th_off << 2;
+ if (off < sizeof(*th) || off > plen) {
+ m_freem(m);
+ return NULL;
+ }
+ th->th_sum = 0;
+ th->th_sum = in4_cksum(m, IPPROTO_TCP, poff, plen);
+ break;
+ case IPPROTO_UDP:
+ IP6_EXTHDR_GET(uh, struct udphdr *, m, poff, sizeof(*uh));
+ if (uh == NULL)
+ return NULL;
+ off = sizeof(*uh);
+ if (off > plen) {
+ m_freem(m);
+ return NULL;
+ }
+ uh->uh_sum = 0;
+ uh->uh_sum = in4_cksum(m, IPPROTO_UDP, poff, plen);
+ break;
+ default:
+ /* no checksum */
+ return m;
+ }
- return m;
+ return m;
}
/*