lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <076c9048-ec89-6f0b-a0ed-845500754ffc@cogentembedded.com>
Date:   Wed, 7 Mar 2018 18:56:59 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     dsahern@...il.com, netdev@...r.kernel.org,
        Stephen Hemminger <sthemmin@...rosoft.com>
Subject: Re: [PATCH iproute2-next 2/3] ipmroute: don't complain about unicast
 routes

On 03/07/2018 06:54 PM, Stephen Hemminger wrote:

>> Hello!
>>
>> On 3/7/2018 4:03 AM, Stephen Hemminger wrote:
>>
>>> From: Stephen Hemminger <sthemmin@...rosoft.com>
>>>
>>> Every non-multicast route prints an error message.
>>> Kernel doesn't filter out unicast routes, it is up to filter function
>>> to do this.
>>>
>>> Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
>>> ---
>>>   ip/ipmroute.c | 7 +++----
>>>   1 file changed, 3 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/ip/ipmroute.c b/ip/ipmroute.c
>>> index aa5029b44f41..03ca0575e571 100644
>>> --- a/ip/ipmroute.c
>>> +++ b/ip/ipmroute.c
>>> @@ -75,15 +75,14 @@ int print_mroute(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
>>>   		fprintf(stderr, "BUG: wrong nlmsg len %d\n", len);
>>>   		return -1;
>>>   	}
>>> -	if (r->rtm_type != RTN_MULTICAST) {
>>> -		fprintf(stderr, "Not a multicast route (type: %s)\n",
>>> -			rtnl_rtntype_n2a(r->rtm_type, b1, sizeof(b1)));
>>> +
>>> +	if (r->rtm_type != RTN_MULTICAST)
>>>   		return 0;
>>> -	}
>>>   
>>>   	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
>>>   	table = rtm_get_table(r, tb);
>>>   
>>> +  
>>
>>     Why?
>>
>>>   	if (filter.tb > 0 && filter.tb != table)
>>>   		return 0;
>>>     
>>
>> MBR, Sergei
> 
> The kernel dumps all routes in response to the RTM_GETROUTE and therefore all routes show
> up in print_mroute.  On my system (which has no mcast), I get this with standard 4.14
> kernel and ip commands.

   I was merely asking about a double new line... :-)

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ