Remove _IP_VHL* macros and related ifdefs.

MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2014-04-16 05:31:54 +00:00
parent f83d85861b
commit cd92c2e1ec
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264520
2 changed files with 0 additions and 24 deletions

View File

@ -560,11 +560,7 @@ ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport)
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 secpolicyindex *spidx, int needport)
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 secpolicyindex *spidx, int needport)
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;
}

View File

@ -206,11 +206,7 @@ ipsec_process_done(struct mbuf *m, struct ipsecrequest *isr)
*/
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);