[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1G1kGi-000549-00@gondolin.me.apana.org.au>
Date: Sat, 15 Jul 2006 23:33:16 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: gerrit@....abdn.ac.uk (Gerrit Renker)
Cc: akpm@...l.org, davem@...emloft.net, yoshfuji@...ux-ipv6.org,
kuznet@....inr.ac.ru, jmorris@...ei.org, kaber@...eworks.de,
pekkas@...core.fi, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 2.6.18-rc1-mm2 1/3] net: UDP-Lite generic support
Gerrit Renker <gerrit@....abdn.ac.uk> wrote:
>
> diff -Nurp a/net/core/sock.c b/net/core/sock.c
> --- a/net/core/sock.c 2006-07-06 09:08:24.000000000 +0100
> +++ b/net/core/sock.c 2006-07-14 10:17:50.000000000 +0100
> @@ -479,7 +479,12 @@ set_rcvbuf:
> break;
>
> case SO_NO_CHECK:
> - sk->sk_no_check = valbool;
> + /* UDP-Lite (RFC 3828) mandates checksumming,
> + * hence user must not enable this option. */
> + if (sk->sk_protocol == IPPROTO_UDPLITE)
> + ret = -EOPNOTSUPP;
> + else
> + sk->sk_no_check = valbool;
Please don't add protocol-specific stuff to generic functions. In this
case why don't you just ignore sk_no_check for UDPLITE as we do for TCP?
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
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