[PATCH net-next v1 0/3] Flow Based GTP Tunneling

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-net-gprs@lists.osmocom.org/.

Jiannan Ouyang ouyangj at fb.com
Thu Jul 13 22:54:10 UTC 2017


Hi Harald and Jeo,

Thank you for the code review. They are really helpful!

> On 7/13/17, 11:14 AM, "Joe Stringer" <joe at ovn.org> wrote:
> 
    > On 13 July 2017 at 00:12, Harald Welte <laforge at gnumonks.org> wrote:
    >> I'm not familiar with the details here, but does this imply that you
    >> are matching on the outer (transport layer) source IP address? If so,
    >> please note this is in violation of the 3GPP specifications for GTP,
    >> which require explicitly that the TEID is the *only* criteria for
    >> matching an encapsulated packet to the tunnel.  Basically anyone can
    >> send you an encapsulated packet from any random source IP, just as long
    >> as the TEID matches a tunnel, it will be decapsulated.
    >>
    >> This is [presumably] in order to take care of mobility, as the
    >> subscribers' phone moves around different MME/S-GW/SGSN, each having
    >> different source IP addresses.
    >
    > I think that this will be hard to avoid; the several existing tunnel
    > implementations that OVS plugs into all allow matching on the outer
    > addresses/ports, I don't see a good way to restrict it without
    > introducing completely new metadata_dst paths for GTP. I'd prefer not
    > to introduce something like this if we can avoid it; several tunnels
    > currently share all of the same metadata_dst code and that's proven
    > sufficient for all cases so far. If someone wishes to implement the
    > 3GPP standard correctly then they should not create matches like this.
    > In quite a few cases, OVS tends to take the approach that we give the
    > user the tools to do what they need to do, but if they wish to shoot
    > themselves in the foot then that's up to them. We can of course work
    >  towards ensuring the OVS userspace guides users in the right direction
    > though.
    
The flow listed out here is an example for the nature of the match
that can be performed, but the actual match rule that is programmed
 by the control plane should wildcard the tun_src as noted by Harald. 

It is the control plane’s responsibility to enforce the 3GPP Specifications, 
e.g. creating flow rules to make TEID the only criteria for matching an 
encapsulated packet to the tunnel.  

I will provide a 3GPP compliant example in the next version, thank Harald
 for pointing it out.

-Jiannan



More information about the osmocom-net-gprs mailing list