if_stf.c (152242) | if_stf.c (159180) |
---|---|
1/* $FreeBSD: head/sys/net/if_stf.c 152242 2005-11-09 13:29:16Z ru $ */ | 1/* $FreeBSD: head/sys/net/if_stf.c 159180 2006-06-02 19:59:33Z csjp $ */ |
2/* $KAME: if_stf.c,v 1.73 2001/12/03 11:08:30 keiichi Exp $ */ 3 4/*- 5 * Copyright (C) 2000 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 461 unchanged lines hidden (view full) --- 471 ptr = GET_V4(&dst6->sin6_addr); 472 else { 473 m_freem(m); 474 ifp->if_oerrors++; 475 return ENETUNREACH; 476 } 477 bcopy(ptr, &in4, sizeof(in4)); 478 | 2/* $KAME: if_stf.c,v 1.73 2001/12/03 11:08:30 keiichi Exp $ */ 3 4/*- 5 * Copyright (C) 2000 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 461 unchanged lines hidden (view full) --- 471 ptr = GET_V4(&dst6->sin6_addr); 472 else { 473 m_freem(m); 474 ifp->if_oerrors++; 475 return ENETUNREACH; 476 } 477 bcopy(ptr, &in4, sizeof(in4)); 478 |
479 if (ifp->if_bpf) { | 479 if (bpf_peers_present(ifp->if_bpf)) { |
480 /* 481 * We need to prepend the address family as 482 * a four byte field. Cons up a dummy header 483 * to pacify bpf. This is safe because bpf 484 * will only read from the mbuf (i.e., it won't 485 * try to free it or keep a pointer a to it). 486 */ 487 af = AF_INET6; --- 230 unchanged lines hidden (view full) --- 718 ip_ecn_egress(ECN_ALLOWED, &otos, &itos); 719 else 720 ip_ecn_egress(ECN_NOCARE, &otos, &itos); 721 ip6->ip6_flow &= ~htonl(0xff << 20); 722 ip6->ip6_flow |= htonl((u_int32_t)itos << 20); 723 724 m->m_pkthdr.rcvif = ifp; 725 | 480 /* 481 * We need to prepend the address family as 482 * a four byte field. Cons up a dummy header 483 * to pacify bpf. This is safe because bpf 484 * will only read from the mbuf (i.e., it won't 485 * try to free it or keep a pointer a to it). 486 */ 487 af = AF_INET6; --- 230 unchanged lines hidden (view full) --- 718 ip_ecn_egress(ECN_ALLOWED, &otos, &itos); 719 else 720 ip_ecn_egress(ECN_NOCARE, &otos, &itos); 721 ip6->ip6_flow &= ~htonl(0xff << 20); 722 ip6->ip6_flow |= htonl((u_int32_t)itos << 20); 723 724 m->m_pkthdr.rcvif = ifp; 725 |
726 if (ifp->if_bpf) { | 726 if (bpf_peers_present(ifp->if_bpf)) { |
727 /* 728 * We need to prepend the address family as 729 * a four byte field. Cons up a dummy header 730 * to pacify bpf. This is safe because bpf 731 * will only read from the mbuf (i.e., it won't 732 * try to free it or keep a pointer a to it). 733 */ 734 u_int32_t af = AF_INET6; --- 76 unchanged lines hidden --- | 727 /* 728 * We need to prepend the address family as 729 * a four byte field. Cons up a dummy header 730 * to pacify bpf. This is safe because bpf 731 * will only read from the mbuf (i.e., it won't 732 * try to free it or keep a pointer a to it). 733 */ 734 u_int32_t af = AF_INET6; --- 76 unchanged lines hidden --- |