summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/ipsec.c
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2014-04-23 11:22:54 +0000
committerae <ae@FreeBSD.org>2014-04-23 11:22:54 +0000
commita243d13ce71e97e2c1b78efbcebf9acfe1e39e62 (patch)
treeb7e26e5f786cdc62c406b02ff0800ccffa8445f5 /sys/netipsec/ipsec.c
parent8057942ba8ed9b21af24960f0a246d99cc80a3ec (diff)
downloadFreeBSD-src-a243d13ce71e97e2c1b78efbcebf9acfe1e39e62.zip
FreeBSD-src-a243d13ce71e97e2c1b78efbcebf9acfe1e39e62.tar.gz
MFC r264124:
Remove dead code. MFC r264125: Remove unused variable. MFC r264126: The check for local address spoofing lacks ifaddr locking. Remove these loops and use in_localip() and in6_localip() functions instead. MFC r264520: Remove _IP_VHL* macros and related ifdefs.
Diffstat (limited to 'sys/netipsec/ipsec.c')
-rw-r--r--sys/netipsec/ipsec.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c
index 4a22f32..84534f8 100644
--- a/sys/netipsec/ipsec.c
+++ b/sys/netipsec/ipsec.c
@@ -559,11 +559,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);
@@ -607,11 +603,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;
@@ -619,11 +611,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;
}
OpenPOWER on IntegriCloud