svn commit: r264520 - head/sys/netipsec
Andrey V. Elsukov
ae at FreeBSD.org
Wed Apr 16 05:31:55 UTC 2014
Author: ae
Date: Wed Apr 16 05:31:54 2014
New Revision: 264520
URL: http://svnweb.freebsd.org/changeset/base/264520
Log:
Remove _IP_VHL* macros and related ifdefs.
MFC after: 1 week
Modified:
head/sys/netipsec/ipsec.c
head/sys/netipsec/ipsec_output.c
Modified: head/sys/netipsec/ipsec.c
==============================================================================
--- head/sys/netipsec/ipsec.c Tue Apr 15 23:40:47 2014 (r264519)
+++ head/sys/netipsec/ipsec.c Wed Apr 16 05:31:54 2014 (r264520)
@@ -560,11 +560,7 @@ ipsec_setspidx(struct mbuf *m, struct se
m_copydata(m, 0, sizeof(ipbuf), (caddr_t)&ipbuf);
ip = &ipbuf;
}
-#ifdef _IP_VHL
- v = _IP_VHL_V(ip->ip_vhl);
-#else
v = ip->ip_v;
-#endif
switch (v) {
case 4:
error = ipsec4_setspidx_ipaddr(m, spidx);
@@ -608,11 +604,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se
struct ip *ip = mtod(m, struct ip *);
if (ip->ip_off & htons(IP_MF | IP_OFFMASK))
goto done;
-#ifdef _IP_VHL
- off = _IP_VHL_HL(ip->ip_vhl) << 2;
-#else
off = ip->ip_hl << 2;
-#endif
nxt = ip->ip_p;
} else {
struct ip ih;
@@ -620,11 +612,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se
m_copydata(m, 0, sizeof (struct ip), (caddr_t) &ih);
if (ih.ip_off & htons(IP_MF | IP_OFFMASK))
goto done;
-#ifdef _IP_VHL
- off = _IP_VHL_HL(ih.ip_vhl) << 2;
-#else
off = ih.ip_hl << 2;
-#endif
nxt = ih.ip_p;
}
Modified: head/sys/netipsec/ipsec_output.c
==============================================================================
--- head/sys/netipsec/ipsec_output.c Tue Apr 15 23:40:47 2014 (r264519)
+++ head/sys/netipsec/ipsec_output.c Wed Apr 16 05:31:54 2014 (r264520)
@@ -206,11 +206,7 @@ ipsec_process_done(struct mbuf *m, struc
*/
if (sav->natt_type) {
struct ip *ip = mtod(m, struct ip *);
-#ifdef _IP_VHL
- const int hlen = IP_VHL_HL(ip->ip_vhl);
-#else
const int hlen = (ip->ip_hl << 2);
-#endif
int size, off;
struct mbuf *mi;
struct udphdr *udp;
@@ -505,15 +501,7 @@ ipsec4_process_packet(
ip = mtod(m, struct ip *);
ip->ip_len = htons(m->m_pkthdr.len);
ip->ip_sum = 0;
-#ifdef _IP_VHL
- if (ip->ip_vhl == IP_VHL_BORING)
- ip->ip_sum = in_cksum_hdr(ip);
- else
- ip->ip_sum = in_cksum(m,
- _IP_VHL_HL(ip->ip_vhl) << 2);
-#else
ip->ip_sum = in_cksum(m, ip->ip_hl << 2);
-#endif
/* Encapsulate the packet */
error = ipip_output(m, isr, &mp, 0, 0);
More information about the svn-src-all
mailing list