X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fipv6%2Fnetfilter%2Fip6t_LOG.c;h=bb8590bdd6058310fd2099b9b257bf9ab807c14b;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=97fe3a63d0b1cf8289c3d1b4c3dbff70f56fc8fc;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c index 97fe3a63d..bb8590bdd 100644 --- a/net/ipv6/netfilter/ip6t_LOG.c +++ b/net/ipv6/netfilter/ip6t_LOG.c @@ -48,10 +48,10 @@ static spinlock_t log_lock = SPIN_LOCK_UNLOCKED; /* takes in current header and pointer to the header */ /* if another header exists, sets hdrptr to the next header - and returns the new header value, else returns 0 */ + and returns the new header value, else returns IPPROTO_NONE */ static u_int8_t ip6_nexthdr(u_int8_t currenthdr, u_int8_t **hdrptr) { - u_int8_t hdrlen, nexthdr = 0; + u_int8_t hdrlen, nexthdr = IPPROTO_NONE; switch(currenthdr){ case IPPROTO_AH: @@ -77,7 +77,6 @@ static u_int8_t ip6_nexthdr(u_int8_t currenthdr, u_int8_t **hdrptr) break; } return nexthdr; - } /* One level of recursion won't kill us */ @@ -101,7 +100,7 @@ static void dump_packet(const struct ip6t_log_info *info, fragment = 0; hdrptr = (u_int8_t *)(ipv6h + 1); - while (currenthdr) { + while (currenthdr != IPPROTO_NONE) { if ((currenthdr == IPPROTO_TCP) || (currenthdr == IPPROTO_UDP) || (currenthdr == IPPROTO_ICMPV6)) @@ -264,7 +263,7 @@ static void dump_packet(const struct ip6t_log_info *info, } break; } - /* Max length: 10 "PROTO 255 " */ + /* Max length: 10 "PROTO=255 " */ default: printk("PROTO=%u ", currenthdr); }