ip_fw2.c (150636) | ip_fw2.c (151967) |
---|---|
1/*- 2 * Copyright (c) 2002 Luigi Rizzo, Universita` di Pisa 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 * | 1/*- 2 * Copyright (c) 2002 Luigi Rizzo, Universita` di Pisa 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 * |
25 * $FreeBSD: head/sys/netinet/ip_fw2.c 150636 2005-09-27 18:10:43Z mlaier $ | 25 * $FreeBSD: head/sys/netinet/ip_fw2.c 151967 2005-11-02 13:46:32Z andre $ |
26 */ 27 28#define DEB(x) 29#define DDB(x) x 30 31/* 32 * Implement IP packet firewall (new version) 33 */ --- 1520 unchanged lines hidden (view full) --- 1554 */ 1555static struct mbuf * 1556send_pkt(struct ipfw_flow_id *id, u_int32_t seq, u_int32_t ack, int flags) 1557{ 1558 struct mbuf *m; 1559 struct ip *ip; 1560 struct tcphdr *tcp; 1561 | 26 */ 27 28#define DEB(x) 29#define DDB(x) x 30 31/* 32 * Implement IP packet firewall (new version) 33 */ --- 1520 unchanged lines hidden (view full) --- 1554 */ 1555static struct mbuf * 1556send_pkt(struct ipfw_flow_id *id, u_int32_t seq, u_int32_t ack, int flags) 1557{ 1558 struct mbuf *m; 1559 struct ip *ip; 1560 struct tcphdr *tcp; 1561 |
1562 MGETHDR(m, M_DONTWAIT, MT_HEADER); | 1562 MGETHDR(m, M_DONTWAIT, MT_DATA); |
1563 if (m == 0) 1564 return (NULL); 1565 m->m_pkthdr.rcvif = (struct ifnet *)0; 1566 m->m_pkthdr.len = m->m_len = sizeof(struct ip) + sizeof(struct tcphdr); 1567 m->m_data += max_linkhdr; 1568 1569 ip = mtod(m, struct ip *); 1570 bzero(ip, m->m_len); --- 2703 unchanged lines hidden --- | 1563 if (m == 0) 1564 return (NULL); 1565 m->m_pkthdr.rcvif = (struct ifnet *)0; 1566 m->m_pkthdr.len = m->m_len = sizeof(struct ip) + sizeof(struct tcphdr); 1567 m->m_data += max_linkhdr; 1568 1569 ip = mtod(m, struct ip *); 1570 bzero(ip, m->m_len); --- 2703 unchanged lines hidden --- |