Deleted Added
full compact
ipsec_output.c (124765) ipsec_output.c (151967)
1/*-
2 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
3 * 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
3 * 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/netipsec/ipsec_output.c 124765 2004-01-20 22:45:10Z sam $
26 * $FreeBSD: head/sys/netipsec/ipsec_output.c 151967 2005-11-02 13:46:32Z andre $
27 */
28
29/*
30 * IPsec output processing.
31 */
32#include "opt_inet.h"
33#include "opt_inet6.h"
34#include "opt_ipsec.h"

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

495 struct ip6_hdr *ip6;
496 int hlen;
497
498 IPSEC_ASSERT(m->m_len >= sizeof (struct ip6_hdr),
499 ("first mbuf too short, len %u", m->m_len));
500 ip6 = mtod(m, struct ip6_hdr *);
501 hlen = sizeof(struct ip6_hdr);
502 if (m->m_len > hlen) {
27 */
28
29/*
30 * IPsec output processing.
31 */
32#include "opt_inet.h"
33#include "opt_inet6.h"
34#include "opt_ipsec.h"

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

495 struct ip6_hdr *ip6;
496 int hlen;
497
498 IPSEC_ASSERT(m->m_len >= sizeof (struct ip6_hdr),
499 ("first mbuf too short, len %u", m->m_len));
500 ip6 = mtod(m, struct ip6_hdr *);
501 hlen = sizeof(struct ip6_hdr);
502 if (m->m_len > hlen) {
503 MGETHDR(mh, M_DONTWAIT, MT_HEADER);
503 MGETHDR(mh, M_DONTWAIT, MT_DATA);
504 if (!mh) {
505 m_freem(m);
506 return NULL;
507 }
508 M_MOVE_PKTHDR(mh, m);
509 MH_ALIGN(mh, hlen);
510 m->m_len -= hlen;
511 m->m_data += hlen;

--- 257 unchanged lines hidden ---
504 if (!mh) {
505 m_freem(m);
506 return NULL;
507 }
508 M_MOVE_PKTHDR(mh, m);
509 MH_ALIGN(mh, hlen);
510 m->m_len -= hlen;
511 m->m_data += hlen;

--- 257 unchanged lines hidden ---