From owner-freebsd-net@freebsd.org Tue Feb 21 22:50:34 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33880CE8200 for ; Tue, 21 Feb 2017 22:50:34 +0000 (UTC) (envelope-from prabhakar.lakhera@gmail.com) Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EADA01D1C for ; Tue, 21 Feb 2017 22:50:33 +0000 (UTC) (envelope-from prabhakar.lakhera@gmail.com) Received: by mail-qk0-x22f.google.com with SMTP id n127so12386310qkf.0 for ; Tue, 21 Feb 2017 14:50:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=LOSxwyrlieI0UjHGGIYsOql6oLDgVtz/yYkRHOQD+rY=; b=R1nGX2BukgbsYVtXSc8ODNKPeXQ6gmqZrtpbK8mReKR8KQv4Sid62hrVREuUNjEWlo Ga8CPZy06UVAc1Y9kD7WTu4XAPoYttkR2MgrcdvbinqqKf2eNj9FRgCOb+U2Mz4wAT7d A8bWTA+iEEXrHY0ETzx3696eI2+1RzTKdxqlDWXvD/pbir8PtQ1j734Prvwy8IlViqIK epbl2jaoH9PZ5pLqtSy1mJEqae2B18qAa0bHjo9x/06Nbyfh8fHUvEVWqb4Ol/1Sn0ax kT7KeXxaeq9Obg3IBoHZV0/l8Uzy0u4km+4o1HYqTJPKf1yXRAm1yd68ptir1dib3QGc cNYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=LOSxwyrlieI0UjHGGIYsOql6oLDgVtz/yYkRHOQD+rY=; b=T3J8t79UbIYu006ii9O4efag/05ZwBpDgvvktD4Mw3J0ADV9TZSB3LWWYSWPFaQrXS X20QxmbLJ5JH3qSEDp7y/iMf50b1oimud03KFcdVK0F+9xFJnx/PA0xNwC5Qimwg48NU rM+VeN8OY8X7jxxCHo5rB5ox7oTre22yRkPmO555xImaScGPF7PRNGyNDvjKJkDBwi/e zyZzXf41t8IvGZKA/69TMQgeuveeHNJFHGsXRDYl8WjpupcLAZHywuoC7/bc9qXPmptd 8pR6se5D++0FSj8Q6I7E4Q4diXfCOxKy92PF3iVAxGrpsAtY1IvgfqsRWV5dJKkSrcxD KBqQ== X-Gm-Message-State: AMke39lPNVhQ9ejMr7xaK9xpZrLjdw5Iu5yPlgfBzg0bImydCDhQ6FZTFYN0BBHI11i92Pd1NhT/htBbKt1ZqQ== X-Received: by 10.55.204.197 with SMTP id n66mr26832910qkl.291.1487717433016; Tue, 21 Feb 2017 14:50:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.83.37 with HTTP; Tue, 21 Feb 2017 14:50:32 -0800 (PST) From: prabhakar lakhera Date: Tue, 21 Feb 2017 14:50:32 -0800 Message-ID: Subject: Bug in ICMP redirect handling To: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2017 22:50:34 -0000 This seems like a bug: https://svnweb.freebsd.org/base/head/sys/netinet/tcp_subr.c?r1=303457&r2=303456&pathrev=303457 I believe the ordering of if/else checks for cmd value is important as the last one checks for mapping of PRC* to an error. Given that the mapping is defined to be 0 for redirects (only cached routes are supposed to be invalidated), looks like right now we'll simply return from: else if ((unsigned)cmd >= PRC_NCMDS || *inetctlerrmap[cmd] == 0)* return; The above is I guess is only in the head and not in a major version yet.