in_gif.c (686cdd19b1b182f2257bc158116e78c5fef84980) | in_gif.c (d1d1144bd70da4d7381554137fcb4a86864c8fa4) |
---|---|
1/* $FreeBSD$ */ | 1/* $FreeBSD$ */ |
2/* $KAME: in_gif.c,v 1.43 2000/06/20 19:45:00 itojun Exp $ */ | 2/* $KAME: in_gif.c,v 1.44 2000/08/15 07:24:24 itojun Exp $ */ |
3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 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 10 * are met: --- 331 unchanged lines hidden (view full) --- 342 else if ((sc->gif_if.if_flags & IFF_LINK0) != 0 && 343 dst->sin_addr.s_addr == INADDR_ANY) { 344 addrmatch |= 2; /* we accept any source */ 345 } 346 if (addrmatch != 3) 347 return 0; 348 349 /* martian filters on outer source - NOT done in ip_input! */ | 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 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 10 * are met: --- 331 unchanged lines hidden (view full) --- 342 else if ((sc->gif_if.if_flags & IFF_LINK0) != 0 && 343 dst->sin_addr.s_addr == INADDR_ANY) { 344 addrmatch |= 2; /* we accept any source */ 345 } 346 if (addrmatch != 3) 347 return 0; 348 349 /* martian filters on outer source - NOT done in ip_input! */ |
350 if (IN_MULTICAST(ip.ip_src.s_addr)) | 350 if (IN_MULTICAST(ntohl(ip.ip_src.s_addr))) |
351 return 0; 352 switch ((ntohl(ip.ip_src.s_addr) & 0xff000000) >> 24) { 353 case 0: case 127: case 255: 354 return 0; 355 } 356 /* reject packets with broadcast on source */ 357 for (ia4 = TAILQ_FIRST(&in_ifaddrhead); ia4; 358 ia4 = TAILQ_NEXT(ia4, ia_link)) --- 29 unchanged lines hidden --- | 351 return 0; 352 switch ((ntohl(ip.ip_src.s_addr) & 0xff000000) >> 24) { 353 case 0: case 127: case 255: 354 return 0; 355 } 356 /* reject packets with broadcast on source */ 357 for (ia4 = TAILQ_FIRST(&in_ifaddrhead); ia4; 358 ia4 = TAILQ_NEXT(ia4, ia_link)) --- 29 unchanged lines hidden --- |