1
- /* $NetBSD: ipsec_input.c,v 1.29 2012/01/25 21:58:10 drochner Exp $ */
1
+ /* $NetBSD: ipsec_input.c,v 1.29.8.1 2018/03/13 17:47:11 snj Exp $ */
2
2
/* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */
3
3
/* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */
4
4
39
39
*/
40
40
41
41
#include <sys/cdefs.h>
42
- __KERNEL_RCSID (0 , "$NetBSD: ipsec_input.c,v 1.29 2012/01/25 21:58:10 drochner Exp $" );
42
+ __KERNEL_RCSID (0 , "$NetBSD: ipsec_input.c,v 1.29.8.1 2018/03/13 17:47:11 snj Exp $" );
43
43
44
44
/*
45
45
* IPsec input processing.
@@ -332,14 +332,15 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav,
332
332
ip -> ip_len = htons (m -> m_pkthdr .len );
333
333
prot = ip -> ip_p ;
334
334
335
+ #ifdef notyet
335
336
/* IP-in-IP encapsulation */
336
337
if (prot == IPPROTO_IPIP ) {
337
338
struct ip ipn ;
338
339
339
340
/* ipn will now contain the inner IPv4 header */
341
+ /* XXX: check m_pkthdr.len */
340
342
m_copydata (m , ip -> ip_hl << 2 , sizeof (struct ip ), & ipn );
341
343
342
- #ifdef notyet
343
344
/* XXX PROXY address isn't recorded in SAH */
344
345
/*
345
346
* Check that the inner source address is the same as
@@ -367,17 +368,16 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav,
367
368
error = EACCES ;
368
369
goto bad ;
369
370
}
370
- #endif /*XXX*/
371
371
}
372
372
#if INET6
373
373
/* IPv6-in-IP encapsulation. */
374
374
if (prot == IPPROTO_IPV6 ) {
375
375
struct ip6_hdr ip6n ;
376
376
377
377
/* ip6n will now contain the inner IPv6 header. */
378
+ /* XXX: check m_pkthdr.len */
378
379
m_copydata (m , ip -> ip_hl << 2 , sizeof (struct ip6_hdr ), & ip6n );
379
380
380
- #ifdef notyet
381
381
/*
382
382
* Check that the inner source address is the same as
383
383
* the proxy address, if available.
@@ -403,9 +403,9 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav,
403
403
error = EACCES ;
404
404
goto bad ;
405
405
}
406
- #endif /*XXX*/
407
406
}
408
407
#endif /* INET6 */
408
+ #endif /* notyet */
409
409
410
410
/*
411
411
* Record what we've done to the packet (under what SA it was
@@ -651,15 +651,16 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int proto
651
651
/* Save protocol */
652
652
m_copydata (m , protoff , 1 , & prot );
653
653
654
+ #ifdef notyet
654
655
#ifdef INET
655
656
/* IP-in-IP encapsulation */
656
657
if (prot == IPPROTO_IPIP ) {
657
658
struct ip ipn ;
658
659
659
660
/* ipn will now contain the inner IPv4 header */
661
+ /* XXX: check m_pkthdr.len */
660
662
m_copydata (m , skip , sizeof (struct ip ), & ipn );
661
663
662
- #ifdef notyet
663
664
/*
664
665
* Check that the inner source address is the same as
665
666
* the proxy address, if available.
@@ -683,18 +684,16 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int proto
683
684
error = EACCES ;
684
685
goto bad ;
685
686
}
686
- #endif /*XXX*/
687
687
}
688
688
#endif /* INET */
689
-
690
689
/* IPv6-in-IP encapsulation */
691
690
if (prot == IPPROTO_IPV6 ) {
692
691
struct ip6_hdr ip6n ;
693
692
694
693
/* ip6n will now contain the inner IPv6 header. */
694
+ /* XXX: check m_pkthdr.len */
695
695
m_copydata (m , skip , sizeof (struct ip6_hdr ), & ip6n );
696
696
697
- #ifdef notyet
698
697
/*
699
698
* Check that the inner source address is the same as
700
699
* the proxy address, if available.
@@ -719,8 +718,8 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int proto
719
718
error = EACCES ;
720
719
goto bad ;
721
720
}
722
- #endif /*XXX*/
723
721
}
722
+ #endif /* notyet */
724
723
725
724
/*
726
725
* Record what we've done to the packet (under what SA it was
0 commit comments