if_fwip.c (150968) | if_fwip.c (165632) |
---|---|
1/*- 2 * Copyright (c) 2004 3 * Doug Rabson 4 * Copyright (c) 2002-2003 5 * Hidetoshi Shimokawa. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * | 1/*- 2 * Copyright (c) 2004 3 * Doug Rabson 4 * Copyright (c) 2002-2003 5 * Hidetoshi Shimokawa. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * |
36 * $FreeBSD: head/sys/dev/firewire/if_fwip.c 150968 2005-10-05 10:09:17Z glebius $ | 36 * $FreeBSD: head/sys/dev/firewire/if_fwip.c 165632 2006-12-29 13:59:50Z jhb $ |
37 */ 38 39#ifdef HAVE_KERNEL_OPTION_HEADERS 40#include "opt_device_polling.h" 41#include "opt_inet.h" 42#endif 43 44#include <sys/param.h> --- 788 unchanged lines hidden (view full) --- 833 ifp->if_ierrors ++; 834 continue; 835 } 836 837 /* 838 * Record the sender ID for possible BPF usage. 839 */ 840 src = ntohl(p[1]) >> 16; | 37 */ 38 39#ifdef HAVE_KERNEL_OPTION_HEADERS 40#include "opt_device_polling.h" 41#include "opt_inet.h" 42#endif 43 44#include <sys/param.h> --- 788 unchanged lines hidden (view full) --- 833 ifp->if_ierrors ++; 834 continue; 835 } 836 837 /* 838 * Record the sender ID for possible BPF usage. 839 */ 840 src = ntohl(p[1]) >> 16; |
841 if (ifp->if_bpf) { | 841 if (bpf_peers_present(ifp->if_bpf)) { |
842 mtag = m_tag_alloc(MTAG_FIREWIRE, 843 MTAG_FIREWIRE_SENDER_EUID, 844 2*sizeof(uint32_t), M_NOWAIT); 845 if (mtag) { 846 /* bpf wants it in network byte order */ 847 struct fw_device *fd; 848 uint32_t *p = (uint32_t *) (mtag + 1); 849 fd = fw_noderesolve_nodeid(fwip->fd.fc, --- 84 unchanged lines hidden (view full) --- 934 * If we've already rejected the packet, give up now. 935 */ 936 if (rtcode != FWRCODE_COMPLETE) { 937 m_freem(m); 938 ifp->if_ierrors ++; 939 return; 940 } 941 | 842 mtag = m_tag_alloc(MTAG_FIREWIRE, 843 MTAG_FIREWIRE_SENDER_EUID, 844 2*sizeof(uint32_t), M_NOWAIT); 845 if (mtag) { 846 /* bpf wants it in network byte order */ 847 struct fw_device *fd; 848 uint32_t *p = (uint32_t *) (mtag + 1); 849 fd = fw_noderesolve_nodeid(fwip->fd.fc, --- 84 unchanged lines hidden (view full) --- 934 * If we've already rejected the packet, give up now. 935 */ 936 if (rtcode != FWRCODE_COMPLETE) { 937 m_freem(m); 938 ifp->if_ierrors ++; 939 return; 940 } 941 |
942 if (ifp->if_bpf) { | 942 if (bpf_peers_present(ifp->if_bpf)) { |
943 /* 944 * Record the sender ID for possible BPF usage. 945 */ 946 mtag = m_tag_alloc(MTAG_FIREWIRE, MTAG_FIREWIRE_SENDER_EUID, 947 2*sizeof(uint32_t), M_NOWAIT); 948 if (mtag) { 949 /* bpf wants it in network byte order */ 950 struct fw_device *fd; --- 49 unchanged lines hidden --- | 943 /* 944 * Record the sender ID for possible BPF usage. 945 */ 946 mtag = m_tag_alloc(MTAG_FIREWIRE, MTAG_FIREWIRE_SENDER_EUID, 947 2*sizeof(uint32_t), M_NOWAIT); 948 if (mtag) { 949 /* bpf wants it in network byte order */ 950 struct fw_device *fd; --- 49 unchanged lines hidden --- |