diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index d1aa048a6099..0831f6b81717 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -360,6 +360,12 @@ static int ipip_fill_forward_path(struct net_device_path_ctx *ctx, const struct iphdr *tiph = &tunnel->parms.iph; struct rtable *rt; + if (tunnel->collect_md) + return -EOPNOTSUPP; + + if (tunnel->parms.iph.tos & 0x1) + return -EOPNOTSUPP; + rt = ip_route_output(dev_net(ctx->dev), tiph->daddr, tiph->saddr, inet_dsfield_to_dscp(tiph->tos), tunnel->parms.link, RT_SCOPE_UNIVERSE);