Deleted Added
full compact
ip6_ipsec.c (257176) ip6_ipsec.c (262763)
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/netinet6/ip6_ipsec.c 257176 2013-10-26 17:58:36Z glebius $");
31__FBSDID("$FreeBSD: head/sys/netinet6/ip6_ipsec.c 262763 2014-03-05 01:17:47Z glebius $");
32
33#include "opt_inet.h"
34#include "opt_inet6.h"
35#include "opt_ipsec.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>

--- 325 unchanged lines hidden (view full) ---

365 * find the correct route for outer IPv4
366 * header, compute tunnel MTU.
367 */
368 if (sp->req != NULL &&
369 sp->req->sav != NULL &&
370 sp->req->sav->sah != NULL) {
371 ro = &sp->req->sav->sah->route_cache.sa_route;
372 if (ro->ro_rt && ro->ro_rt->rt_ifp) {
32
33#include "opt_inet.h"
34#include "opt_inet6.h"
35#include "opt_ipsec.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>

--- 325 unchanged lines hidden (view full) ---

365 * find the correct route for outer IPv4
366 * header, compute tunnel MTU.
367 */
368 if (sp->req != NULL &&
369 sp->req->sav != NULL &&
370 sp->req->sav->sah != NULL) {
371 ro = &sp->req->sav->sah->route_cache.sa_route;
372 if (ro->ro_rt && ro->ro_rt->rt_ifp) {
373 mtu =
374 ro->ro_rt->rt_rmx.rmx_mtu ?
375 ro->ro_rt->rt_rmx.rmx_mtu :
373 mtu = ro->ro_rt->rt_mtu ? ro->ro_rt->rt_mtu :
376 ro->ro_rt->rt_ifp->if_mtu;
377 mtu -= ipsechdr;
378 }
379 }
380 KEY_FREESP(&sp);
381 }
382#endif /* IPSEC */
383 /* XXX else case missing. */
384 return mtu;
385}
386#endif
374 ro->ro_rt->rt_ifp->if_mtu;
375 mtu -= ipsechdr;
376 }
377 }
378 KEY_FREESP(&sp);
379 }
380#endif /* IPSEC */
381 /* XXX else case missing. */
382 return mtu;
383}
384#endif