pkgsrc/net/sniffit/patches/patch-ai
wiz d3c351cc90 This package contains a hardwired list of device driver names(ewww).
Assume that x86_64 has the same drivers as i386, addresses PR 32332.
No PKGREVISION bump since it didn't compile on amd64 before.

While here:
remove superfluous patches patch-af, patch-ag to config.sub files
(get replaced by CONFIG_SUB_OVERRIDE anyway)
split up multi-patch patch-aa into four patches patch-a[hijk]
2006-01-08 11:02:10 +00:00

33 lines
1.2 KiB
Text

$NetBSD: patch-ai,v 1.1 2006/01/08 11:02:10 wiz Exp $
--- sniffit.0.3.5.c.orig 1997-04-18 11:33:58.000000000 +0200
+++ sniffit.0.3.5.c
@@ -411,11 +411,17 @@ int check_packet(unsigned long ipaddr,
proto=unwrap_packet(sp, info);
if(proto == NO_IP) return DONT_EXAMINE; /* no use in trying */
if(proto == NO_IP_4) return DONT_EXAMINE; /* no use in trying */
+ if(proto == CORRUPT_IP)
+ {printf("Suspicious Packet detected... (Split header)\n");
+ return DONT_EXAMINE;}
memcpy(&iphead,(sp+PROTO_HEAD),sizeof(struct IP_header));
so=(unsigned char *)&(iphead.source);
dest=(unsigned char *)&(iphead.destination);
+ if(info->FRAG_nf!=0)
+ {printf("Fragment Skipped...\n"); return DONT_EXAMINE; };
+
if((proto==TCP)&&(PROTOCOLS&F_TCP))
{
#ifdef DEBUG_ONSCREEN
@@ -1220,6 +1226,10 @@ int check_mask (const struct packetheade
proto=unwrap_packet(sp, info);
if(proto == NO_IP) return DONT_EXAMINE; /* no use in trying */
if(proto == NO_IP_4) return DONT_EXAMINE; /* no use in trying */
+ if(proto == CORRUPT_IP) return DONT_EXAMINE; /* no use in trying */
+
+ if(info->FRAG_nf!=0)
+ {return DONT_EXAMINE; };
(*IP_nr_of_packets)++;
if(proto==ICMP)