if_ethersubr.c (185571) | if_ethersubr.c (185895) |
---|---|
1/*- 2 * Copyright (c) 1982, 1989, 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 --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 | 1/*- 2 * Copyright (c) 1982, 1989, 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 --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 |
30 * $FreeBSD: head/sys/net/if_ethersubr.c 185571 2008-12-02 21:37:28Z bz $ | 30 * $FreeBSD: head/sys/net/if_ethersubr.c 185895 2008-12-10 23:12:39Z zec $ |
31 */ 32 33#include "opt_atalk.h" 34#include "opt_inet.h" 35#include "opt_inet6.h" 36#include "opt_ipx.h" 37#include "opt_mac.h" 38#include "opt_netgraph.h" 39#include "opt_carp.h" 40#include "opt_mbuf_profiling.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> | 31 */ 32 33#include "opt_atalk.h" 34#include "opt_inet.h" 35#include "opt_inet6.h" 36#include "opt_ipx.h" 37#include "opt_mac.h" 38#include "opt_netgraph.h" 39#include "opt_carp.h" 40#include "opt_mbuf_profiling.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> |
45#include <sys/lock.h> |
|
45#include <sys/malloc.h> 46#include <sys/module.h> 47#include <sys/mbuf.h> 48#include <sys/random.h> | 46#include <sys/malloc.h> 47#include <sys/module.h> 48#include <sys/mbuf.h> 49#include <sys/random.h> |
50#include <sys/rwlock.h> |
|
49#include <sys/socket.h> 50#include <sys/sockio.h> 51#include <sys/sysctl.h> 52#include <sys/vimage.h> 53 54#include <net/if.h> 55#include <net/if_arp.h> 56#include <net/netisr.h> --- 9 unchanged lines hidden (view full) --- 66#include <net/vnet.h> 67 68#if defined(INET) || defined(INET6) 69#include <netinet/in.h> 70#include <netinet/in_var.h> 71#include <netinet/if_ether.h> 72#include <netinet/ip_fw.h> 73#include <netinet/ip_dummynet.h> | 51#include <sys/socket.h> 52#include <sys/sockio.h> 53#include <sys/sysctl.h> 54#include <sys/vimage.h> 55 56#include <net/if.h> 57#include <net/if_arp.h> 58#include <net/netisr.h> --- 9 unchanged lines hidden (view full) --- 68#include <net/vnet.h> 69 70#if defined(INET) || defined(INET6) 71#include <netinet/in.h> 72#include <netinet/in_var.h> 73#include <netinet/if_ether.h> 74#include <netinet/ip_fw.h> 75#include <netinet/ip_dummynet.h> |
76#include <netinet/vinet.h> |
|
74#endif 75#ifdef INET6 76#include <netinet6/nd6.h> 77#endif 78 79#ifdef DEV_CARP 80#include <netinet/ip_carp.h> 81#endif --- 339 unchanged lines hidden (view full) --- 421 * ipfw processing for ethernet packets (in and out). 422 * The second parameter is NULL from ether_demux, and ifp from 423 * ether_output_frame. 424 */ 425int 426ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, 427 struct ip_fw **rule, int shared) 428{ | 77#endif 78#ifdef INET6 79#include <netinet6/nd6.h> 80#endif 81 82#ifdef DEV_CARP 83#include <netinet/ip_carp.h> 84#endif --- 339 unchanged lines hidden (view full) --- 424 * ipfw processing for ethernet packets (in and out). 425 * The second parameter is NULL from ether_demux, and ifp from 426 * ether_output_frame. 427 */ 428int 429ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, 430 struct ip_fw **rule, int shared) 431{ |
429 INIT_VNET_IPFW(dst->if_vnet); | 432 INIT_VNET_INET(dst->if_vnet); |
430 struct ether_header *eh; 431 struct ether_header save_eh; 432 struct mbuf *m; 433 int i; 434 struct ip_fw_args args; 435 436 if (*rule != NULL && V_fw_one_pass) 437 return 1; /* dummynet packet, already partially processed */ --- 855 unchanged lines hidden --- | 433 struct ether_header *eh; 434 struct ether_header save_eh; 435 struct mbuf *m; 436 int i; 437 struct ip_fw_args args; 438 439 if (*rule != NULL && V_fw_one_pass) 440 return 1; /* dummynet packet, already partially processed */ --- 855 unchanged lines hidden --- |