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]
Date:	Fri, 17 Apr 2009 12:44:13 +0900
From:	Yuta sugiura <ysugiura@...aclelinux.com>
To:	netdev@...r.kernel.org
CC:	Stephen Hemminger <shemminger@...tta.com>,
	Andreas Schwab <schwab@...ux-m68k.org>,
	David Miller <davem@...emloft.net>, brian.haley@...com
Subject: Re: [IPV6]: ROUTE:read ifname in rt6_info_route()

Thank you for respons to my e-mail.
I read net-snmp's patch as reference.
How about this method?

Stephen Hemminger wrote:
> On Thu, 16 Apr 2009 18:47:04 +0200
> Andreas Schwab <schwab@...ux-m68k.org> wrote:
>
>   
>> Stephen Hemminger <shemminger@...tta.com> writes:
>>
>>     
>>> On Thu, 16 Apr 2009 04:38:00 -0700 (PDT)
>>> David Miller <davem@...emloft.net> wrote:
>>>
>>>       
>>>> From: Yuta sugiura <ysugiura@...aclelinux.com>
>>>> Date: Thu, 16 Apr 2009 20:05:05 +0900
>>>>
>>>>         
>>>>> Hi,
>>>>> I have a suggestion about /proc/net/IPv6_route format.
>>>>> In rt6_info_route(), interface name is treated as a maximum 8
>>>>> characters.
>>>>> But the type of (struct rt6_inf *)->u.dst.dev->name is char[IFNAMESIZ=
>>>>> 16]
>>>>> so, I think that it should change "%8s" to "%16s".
>>>>>           
>>>> Isn't there a way to pass the field length as a paramenter
>>>> to formatting functions?  Then we can just pass in
>>>> IFNAMESIZE as that parameter.
>>>>         
>>> 	seq_printf(m, " %08x %08x %08x %08x %*s\n"
>>>                    rt->rt6i_metric, atomic_read(&rt->u.dst.__refcnt),
>>>  		   rt->u.dst.__use, rt->rt6i_flags,
>>>                    IFNAMESIZE, 
>>>  		   rt->rt6i_dev ? rt->rt6i_dev->name : "")
>>>       
>> Actually since it is the last item on the line a field width does not
>> make much sense, and omitting it would print the name left justified.
>>
>> (And RT6_INFO_LEN is not used any more.)
>>
>> Andreas.
>>
>>     
>
> The issue is what happens if name is not null terminated. in this case
> I bet the kernel already handles that.
>
>   


View attachment "ipv6_route_ifnamesiz2.patch" of type "text/plain" (825 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ