diff options
author | ae <ae@FreeBSD.org> | 2014-04-16 05:31:54 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2014-04-16 05:31:54 +0000 |
commit | 721d16d187d784256a8c2688e27f34f1b004eb49 (patch) | |
tree | a74ce2ba0e7d559cd047e094011eca3aa530f329 /sys | |
parent | 28e79f3caa97a0d7a666d5439a7ad522ed52b243 (diff) | |
download | FreeBSD-src-721d16d187d784256a8c2688e27f34f1b004eb49.zip FreeBSD-src-721d16d187d784256a8c2688e27f34f1b004eb49.tar.gz |
Remove _IP_VHL* macros and related ifdefs.
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netipsec/ipsec.c | 12 | ||||
-rw-r--r-- | sys/netipsec/ipsec_output.c | 12 |
2 files changed, 0 insertions, 24 deletions
diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c index de367f7..c26642d 100644 --- a/sys/netipsec/ipsec.c +++ b/sys/netipsec/ipsec.c @@ -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; } diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index 4ef5ca2..5babb9a 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -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); |