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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS 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 10E7BC43381 for ; Sun, 24 Mar 2019 22:09:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BFE2620896 for ; Sun, 24 Mar 2019 22:09:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dSjYe77e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728997AbfCXWJU (ORCPT ); Sun, 24 Mar 2019 18:09:20 -0400 Received: from mail-pf1-f176.google.com ([209.85.210.176]:36732 "EHLO mail-pf1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfCXWJT (ORCPT ); Sun, 24 Mar 2019 18:09:19 -0400 Received: by mail-pf1-f176.google.com with SMTP id p10so4969707pff.3 for ; Sun, 24 Mar 2019 15:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=gzXIDj34MtOiTqsCVJPuEWh7TB/vNM/Geoq8K081JIg=; b=dSjYe77eCjtq9ODZxY5Ohux8PelgD6jkWfG1X9ZO1kkxeaQtrugAZAzpwaYOA+SllD Ug1T1+3407fEa9Psh1GCu5houtAoomRBpwQmLv7iBKrQfCJxyceC9PdtQtmEgsxJYRmD icEgSDgSVrCZov/xPGVVIrAo5UV6M5+S/cyp62PibhnVu5S8I2WxDVpU3i0yJWCdV9zt JXwk73Rkoyx8Bkoit2JRr6a+QEWU5fNF0Ols2nVFVFVSb9JMC41Hd1VUBhG65/6uQq8G 2ad91mF2trqjB0lMfDZUn2vpA9quHdYOoZZwHlBFm8rmj5XtAvx5jO6TOFhY0iBdiLry Efhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gzXIDj34MtOiTqsCVJPuEWh7TB/vNM/Geoq8K081JIg=; b=KhbtTEUdyGJNEfQgKe1SKxeMxB326X1CNYFXLPN0L7CrpP42al5z/h96Z8EiImK8ws P7efzXKFFu0UveNOgh7UnhbTQjRiPu9CkSXMpP9KU2kldmkATZw6l/v8ZRwTQnjG1xMb RcNK8ntbK8+gxtDbLOABXQRCK393EjeKDgmlyuPi7/2Ssar54dVUqQjZg6nPukbl2Q9z NLOr8SeMHk2KQ9lp8l6wsMJ+nJd5NO4EFF0oyDA0OHDJR+ypYWX3DGykQLUaHFfoypBW jV30RS3flY3DxIyq2RTRQL1UwWpTjLrJ60uOzuMGyoGVluFe9lAalaw1jT9FSdvFvXNJ c14w== X-Gm-Message-State: APjAAAVDKmBbH0jfXeSjvfdljc7tVaDjTOm7TG683m2cEFGStdZXK2Fl GEina0pG09z/r3TcZdAeeKs= X-Google-Smtp-Source: APXvYqy+olFwVtzc4mty3njxsZGZ5DeMKm01YC6Z8uSn1mlk9NQC7g7h5ART3gkzvpgWPaFLGhS+PA== X-Received: by 2002:a17:902:1002:: with SMTP id b2mr21108173pla.248.1553465359002; Sun, 24 Mar 2019 15:09:19 -0700 (PDT) Received: from ?IPv6:2601:282:800:fd80:fd96:610f:12c6:9a86? ([2601:282:800:fd80:fd96:610f:12c6:9a86]) by smtp.googlemail.com with ESMTPSA id 17sm16469853pgz.52.2019.03.24.15.09.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Mar 2019 15:09:18 -0700 (PDT) Subject: Re: [BUG][iproute2][5.0] ip route show table default: "Error: ipv4: FIB table does not exist." To: Michal Kubecek Cc: emersonbernier@tutanota.com, Netdev , Stephen , Kuznet , Jason , Davem References: <0e008631-e6f6-3c08-f76a-8069052f19ef@gmail.com> <20190324182908.GA26076@unicorn.suse.cz> <20190324183618.GB26076@unicorn.suse.cz> From: David Ahern Message-ID: <26689b18-e0f1-c490-7802-4256f12aa5e2@gmail.com> Date: Sun, 24 Mar 2019 16:09:16 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190324183618.GB26076@unicorn.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 3/24/19 12:36 PM, Michal Kubecek wrote: > On Sun, Mar 24, 2019 at 07:29:08PM +0100, Michal Kubecek wrote: >> On Sun, Mar 24, 2019 at 11:20:33AM -0600, David Ahern wrote: >>> On 3/24/19 11:02 AM, emersonbernier@tutanota.com wrote: >>>> Ok but previous versions of iproute2 didn't treat this as error and didn't exited with non-zero status. Is non existing default route a system error which needs fixing? >>> >>> The kernel is returning that error, not iproute2. >>> >>> It is the default *table*, not a default route. >> >> Something did change on iproute2 side between 4.20 and 5.0, though: >> >> lion:~ # rpm -q iproute2 >> iproute2-4.20-0.x86_64 >> lion:~ # ip route show table default ; echo $? >> 0 >> lion:~ # ip route show table 123 ; echo $? >> 0 >> ... >> lion:~ # rpm -q iproute2 >> iproute2-5.0.0-0.x86_64 >> lion:~ # ip route show table default ; echo $? >> Error: ipv4: FIB table does not exist. >> Dump terminated >> 2 >> lion:~ # ip route show table 123 ; echo $? >> Error: ipv4: FIB table does not exist. >> Dump terminated >> 2 >> >> All I did was updating iproute2 package, the same kernel was running for >> both (I tried 5.0.3 and 5.1-rc1). > > Commit c7e6371bc4af ("ip route: Add protocol, table id and device to > dump request") seems to be an obvious candidate. Before it, no matching > rules in the dump used to be presented as an empty table but now ip gets > a kernel error which it displays to the user. > It's the commit that enables strict checking. Kernel side has been changed to better inform the user of what happens on a request when strict checking is enabled. iproute2 has been updated to use this. Essentially, ip asks for a dump of table 253. In the past there is no data, so nothing to return. The strict checking tells you explicitly "that table does not exist" versus the old method where nothing is returned and the user has to guess "the table exists but is empty or there is a bug dumping the table?" Given the legacy of table 253/default, iproute2 can easily catch this error and just do nothing for backwards compatibility.