ipsec_output.c (b5b47bc6fa9ba9794afd130c91a556a3569166c7) ipsec_output.c (34333b16cdbff9a44599686b809052878716f44e)
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

--- 486 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) {
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

--- 486 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 ---