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: <AANLkTi=JF6q49dqzUsTMmubMhVZooe-WaCBKL+DT5FQy@mail.gmail.com>
Date:	Wed, 3 Nov 2010 21:16:34 +0100
From:	Michał Mirosław <mirqus@...il.com>
To:	Timo Teräs <timo.teras@....fi>
Cc:	netdev@...r.kernel.org, Herbert Xu <herbert@...dor.apana.org.au>
Subject: Re: [PATCH] xfrm: use gre key as flow upper protocol info

2010/11/3 Timo Teräs <timo.teras@....fi>:
> The GRE Key field is intended to be used for identifying an individual
> traffic flow within a tunnel. It is useful to be able to have XFRM
> policy selector matches to have different policies for different
> GRE tunnels.
[...]
> diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
> index 4464f3b..57af4bd 100644
> --- a/net/ipv4/xfrm4_policy.c
> +++ b/net/ipv4/xfrm4_policy.c
> @@ -158,6 +159,20 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
>                                fl->fl_ipsec_spi = htonl(ntohs(ipcomp_hdr[1]));
>                        }
>                        break;
> +
> +               case IPPROTO_GRE:
> +                       if (pskb_may_pull(skb, xprth + 12 - skb->data)) {
> +                               __be16 *greflags = (__be16 *)xprth;
> +                               __be32 *gre_hdr = (__be32 *)xprth;
> +
> +                               if (greflags[0] & GRE_KEY) {
> +                                       if (greflags[0] & GRE_CSUM)
> +                                               gre_hdr++;
> +                                       fl->fl_gre_key = gre_hdr[1];
> +                               }
> +                       }
> +                       break;
> +
>                default:
>                        fl->fl_ipsec_spi = 0;
>                        break;

I would expect that keyless tunnel would be separate from key 0 tunnel.

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ