Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4008666imm; Mon, 15 Oct 2018 07:43:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV63GBuzD5u2/rwqMd6K33oBZDnuZZKn/NRw+hAVjK3EDH1eqoD+MB7SDTLKNyE3eO9zfzSy7 X-Received: by 2002:a62:5547:: with SMTP id j68-v6mr17823411pfb.166.1539614621073; Mon, 15 Oct 2018 07:43:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539614621; cv=none; d=google.com; s=arc-20160816; b=f1H87vXCC3B/kQ0rwGL1xfvu33E7XueDQuoRmUNwXBcUPXnXepsYncgfkhzLFV4RCW WX1852aVFofx/Lblry7G5KhdP9taY9czPUShpKjKAUPa8LfPh+yQLvqPEOrlPqm43XGd 6SCG0GUiiQyyR5Cq2E00QhK9UdIsO61ayxnNBsZ1IEOgiTahebjz9EFQK7HdT8B0ceeJ xWdhKX6+WH5sC0yXm4b8gZZOktdWs+AWeQEbwp9kc26RnzRwaoyzX8Egw0s/dtuhep2q 2ptZBbp6a/n488t3POUoHsSyVo6r9B3PNoqgnl3RgP7Gjr5NQ6jp2RINPfBsR8WEmeI6 TKeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:to:dkim-signature; bh=yt7zleFkKQTj8GCzRUSXwF46MXH3U96O+8q3+ISfAaM=; b=URL3Ip8obg3fwtsSX4VMhphABYHFrg5jHhSuGIGBDmcjGOnTVRz/qDxajn7CTZTW2Y pYri1CO6GpuC36jngOS51i5pE694Wy/E2D3OD6cVbBR5z+cNtzDRPry5y5r7Z3vXRCZ6 SvrGj5y/p2FHJBU8GJkWG/PGq1HfRN2jwPdYAWD4pHHJuHhj+1YFdI0L6tItCSPfmWQz WOpkyUcrIpL7YYvAFtUFdc+cyi1E0zTNfwt2ttbD2hu5WReInePFI3A23AwuPivtpXrE 7Be5AOkdi35v8soMCf8ZZ59Fnajg14K1RA+WRXVstFSj2cydNEiAz3aVPXzbDLiFkMZn r1ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=BgdCLoly; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az12-v6si10867082plb.67.2018.10.15.07.43.26; Mon, 15 Oct 2018 07:43:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=BgdCLoly; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726907AbeJOW2S (ORCPT + 99 others); Mon, 15 Oct 2018 18:28:18 -0400 Received: from mail-qk1-f169.google.com ([209.85.222.169]:39921 "EHLO mail-qk1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726614AbeJOW2R (ORCPT ); Mon, 15 Oct 2018 18:28:17 -0400 Received: by mail-qk1-f169.google.com with SMTP id q5-v6so11954885qki.6 for ; Mon, 15 Oct 2018 07:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=yt7zleFkKQTj8GCzRUSXwF46MXH3U96O+8q3+ISfAaM=; b=BgdCLolyw0VNn9+3a5VSBR/4yYst1BJ/Ma8H1ZBvxJXMTY2xnbajGHz/eC5gdcphMM DKvBcQdnVfliEF3En17ZmZ95a1f93qj+PC+c//59T78xBRKn19ckA3/LqB8mQeL1MgY3 bAlzw9aiKHgxE4//PAeNPGOalEKdgZ/Sh681GZS6tySUdLkbrIhjsHYKnFgN61TgZegi ok5cDTZdtz4SndB3efAuwtRPdHrgMaJkILyAhUJN9ydDBuCvA15/YGnLh1DOkzUrW96L QoahCcn28Qy2lcGCL5ZF9FaW9fKP32ivnhvN26AyegDOfWTe9SSXufG2vhOqWSJ+JvAh DoVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=yt7zleFkKQTj8GCzRUSXwF46MXH3U96O+8q3+ISfAaM=; b=TR5xagumQk2U5ZjN1gAMTTg1bPPWwRkYw/BKd9EO8kGAyb4hYv5Mw+bQBYVQd5gL9/ 9OGDhOvF1nzDygpLPyMfaSGw48SPpnsyCH+4BoO1u1VTsbKfbPCPdCEwAlomZMLEinBI LYmZz3yd5DCfOQrkHMyxTHHXn8Yvaa4RE6CBh+w9iHimJjYu8STTVO0j7QTIKKIjGi/Q 8i7y+gp/SRHYRqA6K0JGIBLibLAbkp7A6T3+r/huMhozetNnbSHso1AZzFo5jjf87JFE Zo0abc5Yere4Z7usUPEuHLtTUcEkZbZP2e86m6MnrFsONIa7WhaneTN0aVygxoutdh0l PPTA== X-Gm-Message-State: ABuFfojDFcWHxfLmAAOPz58ZBGwP/tdW37BUWYqSyftvefoqp6Ee3/Hj +KQxe2+cmUQXqo/pbgp3rXBSHA== X-Received: by 2002:a37:6681:: with SMTP id a123-v6mr15688824qkc.149.1539614562925; Mon, 15 Oct 2018 07:42:42 -0700 (PDT) Received: from [192.168.43.100] ([172.56.20.167]) by smtp.googlemail.com with ESMTPSA id n25-v6sm9290081qkl.8.2018.10.15.07.42.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 07:42:42 -0700 (PDT) To: "linux-kernel@vger.kernel.org" , "David S. Miller" From: Rob Landley Subject: devinet.c inet_abc_len() breaking ifconfig? Message-ID: Date: Mon, 15 Oct 2018 09:42:41 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dave Taht pointed out to me that this doesn't work in toybox: $ ifconfig eth0 242.2.0.1 netmask 255.255.255.0 broadcast 242.2.0.255 ifconfig: ioctl 8916: Invalid argument Because of this in the kernel: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/devinet.c#n940 What is the inet_abc_len() function _for_? When's the last time "class A, Class B, and Class C" IPv4 addresses actually _existed_ as a thing? (Somewhere around 1995?) He suggested I switch to the netlink API, which doesn't enforce this, but... why is the kernel enforcing it for one api but not the other? Rob