]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
ip_tunnel: Add missing validation of encap type to ip_tunnel_encap_setup()
authorThomas Graf <tgraf@suug.ch>
Tue, 16 Dec 2014 20:05:21 +0000 (21:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Dec 2014 20:20:41 +0000 (15:20 -0500)
commitf1fb521f7d94c35e278d76a9198f078223f26799
tree8c2c239aa92c0a1cbe8256ec70635c265f3a3285
parentbb1553c800227f33063fe96561af881619447b83
ip_tunnel: Add missing validation of encap type to ip_tunnel_encap_setup()

The encap->type comes straight from Netlink. Validate it against
max supported encap types just like ip_encap_hlen() already does.

Fixes: a8c5f9 ("ip_tunnel: Ops registration for secondary encap (fou, gue)")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_tunnel.c