aboutsummaryrefslogtreecommitdiffstats
path: root/gtp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-01-25 20:09:16 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-26 18:20:22 +0000
commit7d54ed48e78e9666217865f4586c26c6ec896fe6 (patch)
tree63d34c0e54b1ec27d0f551ca90b9af3d7d670703 /gtp
parent07730bb9cc5e225576e6efa8678a7b78a626a7b7 (diff)
ggsn: encaps_tun: Avoid forwarding packet if EUA is unassigned, fix crash
Check (before forwarding received GTP packets into the tun) if the pdp ctx associated with the packet requested was assigned an EUA of the given IP version. This way we avoid for instance forwarding an IPv6 packet (or sending back a response to a Router Solicitation packet) in case the APN was configured without IPv6 support or if the MS/SGSN didn't ask for an IPv6 while requesting an EUA. As a side effect, this commit fixes an OSMO_ASSERT hit introduced in handle_router_mcast in 2d6a69e69a4b4cb2b8cc63c4810dae44e5a4d8f6 due to a deffective MS sending an icmpv6 Router Solicitation over IPv6 after having been requesting and assigned an IPv4 EUA (so no IPv6 packets expected). Before that commit, there was no crash but the message was being wrongly answered and used an uninitialized .v6 addr field from the peer struct. Fixes: OS#2843 Change-Id: Ib6d18a64c2b71f3bcf6cb7e3a978d2d3f9c7a79b
Diffstat (limited to 'gtp')
0 files changed, 0 insertions, 0 deletions