in_gif.c (196019) | in_gif.c (196039) |
---|---|
1/* $KAME: in_gif.c,v 1.54 2001/05/14 14:02:16 itojun Exp $ */ 2 3/*- 4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 5 * 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 --- 16 unchanged lines hidden (view full) --- 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 */ 31 32#include <sys/cdefs.h> | 1/* $KAME: in_gif.c,v 1.54 2001/05/14 14:02:16 itojun Exp $ */ 2 3/*- 4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 5 * 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 --- 16 unchanged lines hidden (view full) --- 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/in_gif.c 196019 2009-08-01 19:26:27Z rwatson $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/in_gif.c 196039 2009-08-02 19:43:32Z rwatson $"); |
34 35#include "opt_mrouting.h" 36#include "opt_inet.h" 37#include "opt_inet6.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/socket.h> --- 234 unchanged lines hidden (view full) --- 276 int proto; 277 278 ip = mtod(m, struct ip *); 279 proto = ip->ip_p; 280 281 sc = (struct gif_softc *)encap_getarg(m); 282 if (sc == NULL) { 283 m_freem(m); | 34 35#include "opt_mrouting.h" 36#include "opt_inet.h" 37#include "opt_inet6.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/socket.h> --- 234 unchanged lines hidden (view full) --- 276 int proto; 277 278 ip = mtod(m, struct ip *); 279 proto = ip->ip_p; 280 281 sc = (struct gif_softc *)encap_getarg(m); 282 if (sc == NULL) { 283 m_freem(m); |
284 IPSTAT_INC(ips_nogif); | 284 KMOD_IPSTAT_INC(ips_nogif); |
285 return; 286 } 287 288 gifp = GIF2IFP(sc); 289 if (gifp == NULL || (gifp->if_flags & IFF_UP) == 0) { 290 m_freem(m); | 285 return; 286 } 287 288 gifp = GIF2IFP(sc); 289 if (gifp == NULL || (gifp->if_flags & IFF_UP) == 0) { 290 m_freem(m); |
291 IPSTAT_INC(ips_nogif); | 291 KMOD_IPSTAT_INC(ips_nogif); |
292 return; 293 } 294 295 otos = ip->ip_tos; 296 m_adj(m, off); 297 298 switch (proto) { 299#ifdef INET --- 43 unchanged lines hidden (view full) --- 343 break; 344 } 345#endif /* INET6 */ 346 case IPPROTO_ETHERIP: 347 af = AF_LINK; 348 break; 349 350 default: | 292 return; 293 } 294 295 otos = ip->ip_tos; 296 m_adj(m, off); 297 298 switch (proto) { 299#ifdef INET --- 43 unchanged lines hidden (view full) --- 343 break; 344 } 345#endif /* INET6 */ 346 case IPPROTO_ETHERIP: 347 af = AF_LINK; 348 break; 349 350 default: |
351 IPSTAT_INC(ips_nogif); | 351 KMOD_IPSTAT_INC(ips_nogif); |
352 m_freem(m); 353 return; 354 } 355 gif_input(m, af, gifp); 356 return; 357} 358 359/* --- 106 unchanged lines hidden --- | 352 m_freem(m); 353 return; 354 } 355 gif_input(m, af, gifp); 356 return; 357} 358 359/* --- 106 unchanged lines hidden --- |