mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Bowler <nbowler@ellipticsemi.com>
To: "Fortier,Vincent [Montreal]" <Vincent.Fortier1@EC.GC.CA>
Cc: linux-kernel@vger.kernel.org,
	"Gélineau,Samuel [Montreal]" <samuel.gelineau@EC.GC.CA>
Subject: Re: Patch for Apani Nortel VPN Client to build against kernel 2.6.22  help/review
Date: Wed, 22 Aug 2007 12:18:28 -0400	[thread overview]
Message-ID: <20070822161828.GA16063@totient.ellipticsemi.com> (raw)
In-Reply-To: <F1D642E5A91BC94D9504EC83AE19E6B0128B34@ecqcmtlmail3.quebec.int.ec.gc.ca>

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/)


  reply	other threads:[~2007-08-22 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-22 15:38 Fortier,Vincent [Montreal]
2007-08-22 16:18 ` Nick Bowler [this message]
2007-09-11 16:57   ` Fortier,Vincent [Montreal]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070822161828.GA16063@totient.ellipticsemi.com \
    --to=nbowler@ellipticsemi.com \
    --cc=Vincent.Fortier1@EC.GC.CA \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samuel.gelineau@EC.GC.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®