Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752007AbbHEI5U (ORCPT ); Wed, 5 Aug 2015 04:57:20 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:34398 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073AbbHEI5Q (ORCPT ); Wed, 5 Aug 2015 04:57:16 -0400 MIME-Version: 1.0 From: Zang MingJie Date: Wed, 5 Aug 2015 04:56:56 -0400 Message-ID: Subject: [BUG] net/ipv4: inconsistent routing table To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 853 Lines: 30 Hi: I found a bug when remove an ip address which is referenced by a routing entry. step to reproduce: ip li add type dummy ip li set dummy0 up ip ad add 10.0.0.1/24 dev dummy0 ip ad add 10.0.0.2/24 dev dummy0 ip ro add default via 10.0.0.2/24 ip ad del 10.0.0.2/24 dev dummy0 after deleting the secondary ip address, the routing entry still pointing to 10.0.0.2 # ip ro default via 10.0.0.2 dev dummy0 10.0.0.0/24 dev dummy0 proto kernel scope link src 10.0.0.1 but actually, kernel considers the default route is directly connected. # ip ro get 1.1.1.1 1.1.1.1 dev dummy0 src 10.0.0.1 cache -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/