lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070822161828.GA16063@totient.ellipticsemi.com>
Date:	Wed, 22 Aug 2007 12:18:28 -0400
From:	Nick Bowler <nbowler@...ipticsemi.com>
To:	"Fortier,Vincent [Montreal]" <Vincent.Fortier1@...GC.CA>
Cc:	linux-kernel@...r.kernel.org,
	GĂ©lineau,Samuel [Montreal] 
	<samuel.gelineau@...GC.CA>
Subject: Re: Patch for Apani Nortel VPN Client to build against kernel 2.6.22  help/review

I haven't read too much into the patch, but some quick comments.  Most applies
throughout:

> +#if (LINUX_VERSION_CODE >= 0x020616)
KERNEL_VERSION(2,6,22) is much more readable than 0x020616.

> +  return (struct iphdr*) skb->network_header;
Should be return ip_hdr(skb);

> +    skb->network_header = skb->data;
Should be skb_reset_network_header(skb);

> +    iph = skb->network_header.iph;
Probably meant skb->nh.iph.

> +  if ( iph->protocol == 17 )            /* if UDP, */
(snip)
> +  if ( iph->protocol == 6 )             /* if TCP, */
Could use IPPROTO_UDP and IPPROTO_TCP instead of 17 and 6, respectively.

Instead of littering the code with #if blah #else blah, you could also simply
provide implementations for the 2.6.22 functions #if LINUX_VERSION_CODE <
KERNEL_VERSION(2,6,22).

-- 
Nick Bowler, Elliptic Semiconductor (http://www.ellipticsemi.com/)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ