summaryrefslogtreecommitdiff
path: root/sys/netinet6/ip6_divert.c
diff options
context:
space:
mode:
authorLawrence Teo <lteo@cvs.openbsd.org>2014-08-10 03:24:52 +0000
committerLawrence Teo <lteo@cvs.openbsd.org>2014-08-10 03:24:52 +0000
commitf714e8e2631625e3a5edc504e032643579078a08 (patch)
tree72b225db8e753b5001db585bb82ae8c94069b26c /sys/netinet6/ip6_divert.c
parentddbb4c7a5aad6c1a92dea9e6e278243d352238e5 (diff)
Rename p_hdrlen to min_hdrlen to better reflect its purpose.
No object file change ok florian@ henning@
Diffstat (limited to 'sys/netinet6/ip6_divert.c')
-rw-r--r--sys/netinet6/ip6_divert.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c
index b817eb433e3..a734734c9cc 100644
--- a/sys/netinet6/ip6_divert.c
+++ b/sys/netinet6/ip6_divert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_divert.c,v 1.28 2014/07/22 11:06:10 mpi Exp $ */
+/* $OpenBSD: ip6_divert.c,v 1.29 2014/08/10 03:24:51 lteo Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -88,7 +88,7 @@ divert6_output(struct inpcb *inp, struct mbuf *m, struct mbuf *nam,
struct sockaddr_in6 *sin6;
struct socket *so;
struct ifaddr *ifa;
- int s, error = 0, p_hdrlen = 0, nxt = 0, off, dir;
+ int s, error = 0, min_hdrlen = 0, nxt = 0, off, dir;
struct ip6_hdr *ip6;
m->m_pkthdr.rcvif = NULL;
@@ -127,22 +127,22 @@ divert6_output(struct inpcb *inp, struct mbuf *m, struct mbuf *nam,
switch (nxt) {
case IPPROTO_TCP:
- p_hdrlen = sizeof(struct tcphdr);
+ min_hdrlen = sizeof(struct tcphdr);
m->m_pkthdr.csum_flags |= M_TCP_CSUM_OUT;
break;
case IPPROTO_UDP:
- p_hdrlen = sizeof(struct udphdr);
+ min_hdrlen = sizeof(struct udphdr);
m->m_pkthdr.csum_flags |= M_UDP_CSUM_OUT;
break;
case IPPROTO_ICMPV6:
- p_hdrlen = sizeof(struct icmp6_hdr);
+ min_hdrlen = sizeof(struct icmp6_hdr);
m->m_pkthdr.csum_flags |= M_ICMP_CSUM_OUT;
break;
default:
/* nothing */
break;
}
- if (p_hdrlen && m->m_pkthdr.len < off + p_hdrlen)
+ if (min_hdrlen && m->m_pkthdr.len < off + min_hdrlen)
goto fail;
m->m_pkthdr.pf.flags |= PF_TAG_DIVERTED_PACKET;