ip.c (51048) | ip.c (51333) |
---|---|
1/* 2 * PPP IP Protocol Interface 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * | 1/* 2 * PPP IP Protocol Interface 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * |
20 * $FreeBSD: head/usr.sbin/ppp/ip.c 51048 1999-09-07 07:51:11Z brian $ | 20 * $FreeBSD: head/usr.sbin/ppp/ip.c 51333 1999-09-16 18:47:59Z brian $ |
21 * 22 * TODO: 23 * o Return ICMP message for filterd packet 24 * and optionaly record it into log. 25 */ 26#include <sys/param.h> 27#if defined(__OpenBSD__) || defined(__NetBSD__) 28#include <sys/socket.h> --- 87 unchanged lines hidden (view full) --- 116 * up to the next possible fragment boundary. Since the smallest 117 * `legal' MTU is 576, and the smallest recommended MTU is 296, any 118 * fragmentation within this range is dubious at best */ 119 len = ntohs(pip->ip_off) & IP_OFFMASK; /* fragment offset */ 120 if (len > 0) { /* Not first fragment within datagram */ 121 if (len < (24 >> 3)) /* don't allow fragment to over-write header */ 122 return (1); 123 /* permit fragments on in and out filter */ | 21 * 22 * TODO: 23 * o Return ICMP message for filterd packet 24 * and optionaly record it into log. 25 */ 26#include <sys/param.h> 27#if defined(__OpenBSD__) || defined(__NetBSD__) 28#include <sys/socket.h> --- 87 unchanged lines hidden (view full) --- 116 * up to the next possible fragment boundary. Since the smallest 117 * `legal' MTU is 576, and the smallest recommended MTU is 296, any 118 * fragmentation within this range is dubious at best */ 119 len = ntohs(pip->ip_off) & IP_OFFMASK; /* fragment offset */ 120 if (len > 0) { /* Not first fragment within datagram */ 121 if (len < (24 >> 3)) /* don't allow fragment to over-write header */ 122 return (1); 123 /* permit fragments on in and out filter */ |
124 return (filter->fragok); | 124 return (!filter->fragok); |
125 } 126 127 cproto = gotinfo = estab = syn = finrst = didname = 0; 128 sport = dport = 0; 129 for (n = 0; n < MAXFILTERS; ) { 130 if (fp->f_action == A_NONE) { 131 n++; 132 fp++; --- 450 unchanged lines hidden --- | 125 } 126 127 cproto = gotinfo = estab = syn = finrst = didname = 0; 128 sport = dport = 0; 129 for (n = 0; n < MAXFILTERS; ) { 130 if (fp->f_action == A_NONE) { 131 n++; 132 fp++; --- 450 unchanged lines hidden --- |