[grsec] ipt_stealth.c patch

Rik Bobbaers Rik.Bobbaers at cc.kuleuven.be
Mon Aug 28 12:13:52 EDT 2006


heya all,

i don't know if anyone uses the ipt_stealth.c stuff... but it allways 
gives me compiler warnings... so i thought: lets try fixing that...

here's my patch:
# diff ipt_stealth.c~ ipt_stealth.c
31a32
 >         const struct xt_match *match,
33a35
 >         unsigned int protoff,
74c76,77
<            const struct ipt_ip *ip,
---
 >            const void *ip,
 >                  const struct xt_match *match,
79,80c82,84
<         if (matchsize != IPT_ALIGN(0))
<                 return 0;
---
 >       const struct ipt_ip *nip = (const struct ipt_ip*)ip;
 >       if (matchsize != IPT_ALIGN(0))
 >               return 0;
82,83c86,87
<       if(((ip->proto == IPPROTO_TCP && !(ip->invflags & IPT_INV_PROTO)) ||
<               ((ip->proto == IPPROTO_UDP) && !(ip->invflags & 
IPT_INV_PROTO)))
---
 >       if(((nip->proto == IPPROTO_TCP && !(nip->invflags & 
IPT_INV_PROTO)) ||
 >               ((nip->proto == IPPROTO_UDP) && !(nip->invflags & 
IPT_INV_PROTO)))

i didn't know a good name for the new ip variable , so i called it nip...

any comments? it's a dirty hack i think, but i think it's correct afaik...

greetz,

-- 
harry
aka Rik Bobbaers

K.U.Leuven - LUDIT          -=- Tel: +32 485 52 71 50
Rik.Bobbaers at cc.kuleuven.be -=- http://harry.ulyssis.org

"Work hard and do your best, it'll make it easier for the rest"
-- Garfield

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the grsecurity mailing list