diff options
author | Guillaume Nault <gnault@redhat.com> | 2020-07-25 15:06:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-28 17:30:25 -0700 |
commit | 302d201b5cdf6f4781ee6cd9862f377f975d6c43 (patch) | |
tree | 8748b700a93dec4939c257cc9bd9ca66802509f5 /fs/autofs | |
parent | 706ec919164622ff5ce822065472d0f30a9e9dd2 (diff) |
bareudp: forbid mixing IP and MPLS in multiproto mode
In multiproto mode, bareudp_xmit() accepts sending multicast MPLS and
IPv6 packets regardless of the bareudp ethertype. In practice, this
let an IP tunnel send multicast MPLS packets, or an MPLS tunnel send
IPv6 packets.
We need to restrict the test further, so that the multiproto mode only
enables
* IPv6 for IPv4 tunnels,
* or multicast MPLS for unicast MPLS tunnels.
To improve clarity, the protocol validation is moved to its own
function, where each logical test has its own condition.
v2: s/ntohs/htons/
Fixes: 4b5f67232d95 ("net: Special handling for IP & MPLS.")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/autofs')
0 files changed, 0 insertions, 0 deletions