From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758521AbdELR2a (ORCPT ); Fri, 12 May 2017 13:28:30 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36202 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758021AbdELR0Q (ORCPT ); Fri, 12 May 2017 13:26:16 -0400 Subject: Re: [PATCH] net: ipv6: Truncate single route when it doesn't fit into dump buffer. To: David Miller , mq@ucw.cz Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dsa@cumulusnetworks.com, kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net References: <20170512111510.2697-1-mq@ucw.cz> <20170512.112447.1421545301592945998.davem@davemloft.net> From: David Ahern Message-ID: <3828cf04-1bf8-92d2-dfc4-184bd615fe10@gmail.com> Date: Fri, 12 May 2017 10:26:08 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170512.112447.1421545301592945998.davem@davemloft.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/12/17 8:24 AM, David Miller wrote: > From: Jan Moskyto Matejka > Date: Fri, 12 May 2017 13:15:10 +0200 > >> -int rt6_dump_route(struct rt6_info *rt, void *p_arg); >> +int rt6_dump_route(struct rt6_info *rt, void *p_arg, int truncate); > > Please use "bool" and "true"/"false" for boolean values. > > What does ipv4 do in this situation? > > I'm hesitant to be OK with adding a new nlmsg flag just for this case > if we solve this problem differently and using existing mechanisms > elsewhere. > I'll take a look at this later today or this weekend; we can't just truncate the route returned to userspace.