From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DD77C43381 for ; Tue, 26 Feb 2019 17:00:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F14C20C01 for ; Tue, 26 Feb 2019 17:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551200414; bh=yIJjRzFgVpzB3sDTJ37vBo1vhyij1sLn7lsTcnEWp6k=; h=From:To:Cc:Subject:Date:List-ID:From; b=J+bl8JovexknTcJaKiwU6OfTnAoeRb/1Fw3WZIj+5MbrxT2oxcLQRiiAETzx0sU1J pKMkZhb5ahGV4VRJ4rlaFlJfqDQSMmZDkY0p5/s52DIvvpKFn2pYs0ZelHupIU2ewg +XMkg/ZmtbYH+xmelSNNlj1XcSREmkLMkSpfT+cY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727911AbfBZRAG (ORCPT ); Tue, 26 Feb 2019 12:00:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:40758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbfBZRAG (ORCPT ); Tue, 26 Feb 2019 12:00:06 -0500 Received: from kenny.it.cumulusnetworks.com. (fw.cumulusnetworks.com [216.129.126.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B2DB120C01; Tue, 26 Feb 2019 17:00:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551200405; bh=yIJjRzFgVpzB3sDTJ37vBo1vhyij1sLn7lsTcnEWp6k=; h=From:To:Cc:Subject:Date:From; b=U7WBTAAuZ4BTMKjaw9Jy8scffhb3GTZtYKYTCmCdFthPSYux3F2x9uIFXGYBd8HtC oMveedPLnzRR1qRy1Nf9emo9HMG4/VtGrCvoKGGaaG19z+XlWLSMeslXAZq8bNPJ9U 5lho4z3DCiZvPhFZ8oEOQdfEFqPq+YV6AERLOUPQ= From: David Ahern To: davem@davemloft.net Cc: netdev@vger.kernel.org, David Ahern Subject: [PATCH net 0/3] net: Fail route add with unsupported nexthop attribute Date: Tue, 26 Feb 2019 09:00:01 -0800 Message-Id: <20190226170004.4535-1-dsahern@kernel.org> X-Mailer: git-send-email 2.11.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: David Ahern RTA_VIA was added for MPLS as a way of specifying a gateway from a different address family. IPv4 and IPv6 do not currently support RTA_VIA so using it leads to routes that are not what the user intended. Catch and fail - returning a proper error message. MPLS on the other hand does not support RTA_GATEWAY since it does not make sense to have a nexthop from the MPLS address family. Similarly, catch and fail - returning a proper error message. David Ahern (3): ipv4: Return error for RTA_VIA attribute ipv6: Return error for RTA_VIA attribute mpls: Return error for RTA_GATEWAY attribute net/ipv4/fib_frontend.c | 4 ++++ net/ipv6/route.c | 4 ++++ net/mpls/af_mpls.c | 3 +++ 3 files changed, 11 insertions(+) -- 2.11.0