if_fwsubr.c (163606) | if_fwsubr.c (169735) |
---|---|
1/*- 2 * Copyright (c) 2004 Doug Rabson 3 * Copyright (c) 1982, 1989, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * | 1/*- 2 * Copyright (c) 2004 Doug Rabson 3 * Copyright (c) 1982, 1989, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * |
30 * $FreeBSD: head/sys/net/if_fwsubr.c 163606 2006-10-22 11:52:19Z rwatson $ | 30 * $FreeBSD: head/sys/net/if_fwsubr.c 169735 2007-05-19 05:29:05Z rwatson $ |
31 */ 32 33#include "opt_inet.h" 34#include "opt_inet6.h" 35#include "opt_mac.h" 36 37#include <sys/param.h> 38#include <sys/systm.h> --- 473 unchanged lines hidden (view full) --- 512 */ 513 if (m->m_pkthdr.len < sizeof(uint32_t)) { 514 if_printf(ifp, "discarding frame without " 515 "encapsulation header (len %u pkt len %u)\n", 516 m->m_len, m->m_pkthdr.len); 517 } 518 519 m = m_pullup(m, sizeof(uint32_t)); | 31 */ 32 33#include "opt_inet.h" 34#include "opt_inet6.h" 35#include "opt_mac.h" 36 37#include <sys/param.h> 38#include <sys/systm.h> --- 473 unchanged lines hidden (view full) --- 512 */ 513 if (m->m_pkthdr.len < sizeof(uint32_t)) { 514 if_printf(ifp, "discarding frame without " 515 "encapsulation header (len %u pkt len %u)\n", 516 m->m_len, m->m_pkthdr.len); 517 } 518 519 m = m_pullup(m, sizeof(uint32_t)); |
520 if (m == NULL) 521 return; |
|
520 enc = mtod(m, union fw_encap *); 521 522 /* 523 * Byte swap the encapsulation header manually. 524 */ 525 enc->ul[0] = ntohl(enc->ul[0]); 526 527 if (enc->unfrag.lf != 0) { --- 331 unchanged lines hidden --- | 522 enc = mtod(m, union fw_encap *); 523 524 /* 525 * Byte swap the encapsulation header manually. 526 */ 527 enc->ul[0] = ntohl(enc->ul[0]); 528 529 if (enc->unfrag.lf != 0) { --- 331 unchanged lines hidden --- |