All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Latest iproute2 breaks "ip route get" command
  2010-08-08 19:33 Latest iproute2 breaks "ip route get" command Andreas Henriksson
@ 2010-08-08 19:31 ` Fabio Comolli
  2010-08-08 19:52   ` Andreas Henriksson
  0 siblings, 1 reply; 10+ messages in thread
From: Fabio Comolli @ 2010-08-08 19:31 UTC (permalink / raw)
  To: Andreas Henriksson; +Cc: Ulrich Weber, netdev

Yup, that seems to fix it.
You can add my Tested-By in case you need it.

Regards,
Fabio




On Sun, Aug 8, 2010 at 9:33 PM, Andreas Henriksson <andreas@fatal.se> wrote:
>> The following logs should explain the problem. In short, the "ip route
>> get" command with iproute2 v. 2.6.35 does not output anything (and
>> exits with a 0). This breaks (for example) vpnc.
>
> Seems to be caused by:
>
> http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commitdiff;h=447928279c88b6581ae4cdc1b5ac0a9e755aff64
>
> Have no idea if this is the correct fix, but it seemed like a likely typo
> based on the changes in the above commit and that this brings the output back:
>
>
> diff --git a/ip/iproute.c b/ip/iproute.c
> index 711576e..86c7ab7 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -160,7 +160,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
>        if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN)
>                ip6_multiple_tables = 1;
>
> -       if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED))
> +       if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED))
>                return 0;
>
>        if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) {
>
>
>
> (PS. Sorry for not properly replying in thread, but todays mailing list
> archives seems to be extremely afraid of exposing any real mail headers
> making it hard to reply properly without having received the original mail.)
>
> --
> Andreas Henriksson
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Latest iproute2 breaks "ip route get" command
@ 2010-08-08 19:33 Andreas Henriksson
  2010-08-08 19:31 ` Fabio Comolli
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Henriksson @ 2010-08-08 19:33 UTC (permalink / raw)
  To: Fabio Comolli, Ulrich Weber; +Cc: netdev

> The following logs should explain the problem. In short, the "ip route
> get" command with iproute2 v. 2.6.35 does not output anything (and
> exits with a 0). This breaks (for example) vpnc.

Seems to be caused by:

http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commitdiff;h=447928279c88b6581ae4cdc1b5ac0a9e755aff64

Have no idea if this is the correct fix, but it seemed like a likely typo
based on the changes in the above commit and that this brings the output back:


diff --git a/ip/iproute.c b/ip/iproute.c
index 711576e..86c7ab7 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -160,7 +160,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 	if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN)
 		ip6_multiple_tables = 1;
 
-	if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED))
+	if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED))
 		return 0;
 
 	if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) {



(PS. Sorry for not properly replying in thread, but todays mailing list
archives seems to be extremely afraid of exposing any real mail headers
making it hard to reply properly without having received the original mail.)

-- 
Andreas Henriksson

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: Latest iproute2 breaks "ip route get" command
  2010-08-08 19:31 ` Fabio Comolli
@ 2010-08-08 19:52   ` Andreas Henriksson
  2010-08-12  9:02     ` Ulrich Weber
  2010-08-12  9:05     ` [PATCH] iproute2: dont filter cached routes on iproute_get Ulrich Weber
  0 siblings, 2 replies; 10+ messages in thread
From: Andreas Henriksson @ 2010-08-08 19:52 UTC (permalink / raw)
  To: Fabio Comolli; +Cc: Ulrich Weber, netdev

On sön, 2010-08-08 at 21:31 +0200, Fabio Comolli wrote:
> Yup, that seems to fix it.
> You can add my Tested-By in case you need it.

I'll let Ulrich Weber confirm it's the right fix and forward to Stephen
Hemminger. Just received an "out of office" notice saying he'll be back
11 august (wednesday), so I guess we'll have to wait a couple of days
for that.

//Andreas


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Latest iproute2 breaks "ip route get" command
  2010-08-08 19:52   ` Andreas Henriksson
@ 2010-08-12  9:02     ` Ulrich Weber
  2010-08-12  9:05     ` [PATCH] iproute2: dont filter cached routes on iproute_get Ulrich Weber
  1 sibling, 0 replies; 10+ messages in thread
From: Ulrich Weber @ 2010-08-12  9:02 UTC (permalink / raw)
  To: Andreas Henriksson, shemminger; +Cc: Fabio Comolli, netdev

Hi Andreas,

your fix will work for IPv4 but will display the IPv6 cached routes
again with "ip -6 route show" what I was trying to fix with
447928279c88b6581ae4cdc1b5ac0a9e755aff64

Will send another patch which makes the filter.cloned check not matching
for iproute_get routes.

Best regards
 Ulrich

On 08/08/2010 09:52 PM, Andreas Henriksson wrote:
> On sön, 2010-08-08 at 21:31 +0200, Fabio Comolli wrote:
>> Yup, that seems to fix it.
>> You can add my Tested-By in case you need it.
> 
> I'll let Ulrich Weber confirm it's the right fix and forward to Stephen
> Hemminger. Just received an "out of office" notice saying he'll be back
> 11 august (wednesday), so I guess we'll have to wait a couple of days
> for that.
> 
> //Andreas
> 


-- 
Ulrich Weber | uweber@astaro.com | Software Engineer
Astaro GmbH & Co. KG | www.astaro.com | Phone +49-721-25516-0 | Fax –200
An der RaumFabrik 33a | 76227 Karlsruhe | Germany

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] iproute2: dont filter cached routes on iproute_get
  2010-08-08 19:52   ` Andreas Henriksson
  2010-08-12  9:02     ` Ulrich Weber
@ 2010-08-12  9:05     ` Ulrich Weber
  2010-08-12  9:12       ` Fabio Comolli
  2010-08-23 15:15       ` Stephen Hemminger
  1 sibling, 2 replies; 10+ messages in thread
From: Ulrich Weber @ 2010-08-12  9:05 UTC (permalink / raw)
  To: Andreas Henriksson, shemminger; +Cc: Fabio Comolli, netdev

iproute_get will return cloned routes for IPv4
and cloned as well non-cloned routes for IPv6.

Therefore RTM_F_CLONED flag should not be checked
for iproute_get routes. Check in print_route will
always fail because valid values are 0 and 1.

Signed-off-by: Ulrich Weber <uweber@astaro.com>
---
 ip/iproute.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ip/iproute.c b/ip/iproute.c
index 711576e..b43933c 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -1286,6 +1286,7 @@ int iproute_get(int argc, char **argv)
 	memset(&req, 0, sizeof(req));
 
 	iproute_reset_filter();
+	filter.cloned = 2;
 
 	req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
 	req.n.nlmsg_flags = NLM_F_REQUEST;
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] iproute2: dont filter cached routes on iproute_get
  2010-08-12  9:05     ` [PATCH] iproute2: dont filter cached routes on iproute_get Ulrich Weber
@ 2010-08-12  9:12       ` Fabio Comolli
  2010-08-12  9:20         ` Ulrich Weber
  2010-08-23 15:15       ` Stephen Hemminger
  1 sibling, 1 reply; 10+ messages in thread
From: Fabio Comolli @ 2010-08-12  9:12 UTC (permalink / raw)
  To: Ulrich Weber; +Cc: Andreas Henriksson, shemminger, netdev

Hi.
Is this patch supposed to be applied on top of plain iproute2 v2.6.35
or on top of the previous Andreas' patch?



On Thu, Aug 12, 2010 at 11:05 AM, Ulrich Weber <uweber@astaro.com> wrote:
> iproute_get will return cloned routes for IPv4
> and cloned as well non-cloned routes for IPv6.
>
> Therefore RTM_F_CLONED flag should not be checked
> for iproute_get routes. Check in print_route will
> always fail because valid values are 0 and 1.
>
> Signed-off-by: Ulrich Weber <uweber@astaro.com>
> ---
>  ip/iproute.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/ip/iproute.c b/ip/iproute.c
> index 711576e..b43933c 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -1286,6 +1286,7 @@ int iproute_get(int argc, char **argv)
>        memset(&req, 0, sizeof(req));
>
>        iproute_reset_filter();
> +       filter.cloned = 2;
>
>        req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
>        req.n.nlmsg_flags = NLM_F_REQUEST;
> --
> 1.7.0.4
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] iproute2: dont filter cached routes on iproute_get
  2010-08-12  9:12       ` Fabio Comolli
@ 2010-08-12  9:20         ` Ulrich Weber
  2010-08-12 18:58           ` Fabio Comolli
  0 siblings, 1 reply; 10+ messages in thread
From: Ulrich Weber @ 2010-08-12  9:20 UTC (permalink / raw)
  To: Fabio Comolli; +Cc: Andreas Henriksson, shemminger, netdev

The patch should be applied on top of iproute2 v2.6.35.

Cheers
 Ulrich

On 08/12/2010 11:12 AM, Fabio Comolli wrote:
> Hi.
> Is this patch supposed to be applied on top of plain iproute2 v2.6.35
> or on top of the previous Andreas' patch?
> 
> 
> 
> On Thu, Aug 12, 2010 at 11:05 AM, Ulrich Weber <uweber@astaro.com> wrote:
>> iproute_get will return cloned routes for IPv4
>> and cloned as well non-cloned routes for IPv6.
>>
>> Therefore RTM_F_CLONED flag should not be checked
>> for iproute_get routes. Check in print_route will
>> always fail because valid values are 0 and 1.
>>
>> Signed-off-by: Ulrich Weber <uweber@astaro.com>
>> ---
>>  ip/iproute.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/ip/iproute.c b/ip/iproute.c
>> index 711576e..b43933c 100644
>> --- a/ip/iproute.c
>> +++ b/ip/iproute.c
>> @@ -1286,6 +1286,7 @@ int iproute_get(int argc, char **argv)
>>        memset(&req, 0, sizeof(req));
>>
>>        iproute_reset_filter();
>> +       filter.cloned = 2;
>>
>>        req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
>>        req.n.nlmsg_flags = NLM_F_REQUEST;
>> --
>> 1.7.0.4
>>
>>


-- 
Ulrich Weber | uweber@astaro.com | Software Engineer
Astaro GmbH & Co. KG | www.astaro.com | Phone +49-721-25516-0 | Fax –200
An der RaumFabrik 33a | 76227 Karlsruhe | Germany

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] iproute2: dont filter cached routes on iproute_get
  2010-08-12  9:20         ` Ulrich Weber
@ 2010-08-12 18:58           ` Fabio Comolli
  0 siblings, 0 replies; 10+ messages in thread
From: Fabio Comolli @ 2010-08-12 18:58 UTC (permalink / raw)
  To: Ulrich Weber; +Cc: Andreas Henriksson, shemminger, netdev

Works for me (for ipv4, I cannot test ipv6).
You can add my Tested-By in case you need it.

Regards,
Fabio



On Thu, Aug 12, 2010 at 11:20 AM, Ulrich Weber <uweber@astaro.com> wrote:
> The patch should be applied on top of iproute2 v2.6.35.
>
> Cheers
>  Ulrich
>
> On 08/12/2010 11:12 AM, Fabio Comolli wrote:
>> Hi.
>> Is this patch supposed to be applied on top of plain iproute2 v2.6.35
>> or on top of the previous Andreas' patch?
>>
>>
>>
>> On Thu, Aug 12, 2010 at 11:05 AM, Ulrich Weber <uweber@astaro.com> wrote:
>>> iproute_get will return cloned routes for IPv4
>>> and cloned as well non-cloned routes for IPv6.
>>>
>>> Therefore RTM_F_CLONED flag should not be checked
>>> for iproute_get routes. Check in print_route will
>>> always fail because valid values are 0 and 1.
>>>
>>> Signed-off-by: Ulrich Weber <uweber@astaro.com>
>>> ---
>>>  ip/iproute.c |    1 +
>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/ip/iproute.c b/ip/iproute.c
>>> index 711576e..b43933c 100644
>>> --- a/ip/iproute.c
>>> +++ b/ip/iproute.c
>>> @@ -1286,6 +1286,7 @@ int iproute_get(int argc, char **argv)
>>>        memset(&req, 0, sizeof(req));
>>>
>>>        iproute_reset_filter();
>>> +       filter.cloned = 2;
>>>
>>>        req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
>>>        req.n.nlmsg_flags = NLM_F_REQUEST;
>>> --
>>> 1.7.0.4
>>>
>>>
>
>
> --
> Ulrich Weber | uweber@astaro.com | Software Engineer
> Astaro GmbH & Co. KG | www.astaro.com | Phone +49-721-25516-0 | Fax –200
> An der RaumFabrik 33a | 76227 Karlsruhe | Germany
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] iproute2: dont filter cached routes on iproute_get
  2010-08-12  9:05     ` [PATCH] iproute2: dont filter cached routes on iproute_get Ulrich Weber
  2010-08-12  9:12       ` Fabio Comolli
@ 2010-08-23 15:15       ` Stephen Hemminger
  1 sibling, 0 replies; 10+ messages in thread
From: Stephen Hemminger @ 2010-08-23 15:15 UTC (permalink / raw)
  To: Ulrich Weber; +Cc: Andreas Henriksson, Fabio Comolli, netdev

On Thu, 12 Aug 2010 11:05:19 +0200
Ulrich Weber <uweber@astaro.com> wrote:

> iproute_get will return cloned routes for IPv4
> and cloned as well non-cloned routes for IPv6.
> 
> Therefore RTM_F_CLONED flag should not be checked
> for iproute_get routes. Check in print_route will
> always fail because valid values are 0 and 1.
> 
> Signed-off-by: Ulrich Weber <uweber@astaro.com>
> ---
>  ip/iproute.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/ip/iproute.c b/ip/iproute.c
> index 711576e..b43933c 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -1286,6 +1286,7 @@ int iproute_get(int argc, char **argv)
>  	memset(&req, 0, sizeof(req));
>  
>  	iproute_reset_filter();
> +	filter.cloned = 2;
>  
>  	req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
>  	req.n.nlmsg_flags = NLM_F_REQUEST;

Applied

-- 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Latest iproute2 breaks "ip route get" command
@ 2010-08-08 17:02 Fabio Comolli
  0 siblings, 0 replies; 10+ messages in thread
From: Fabio Comolli @ 2010-08-08 17:02 UTC (permalink / raw)
  To: netdev

Good morning.

The following logs should explain the problem. In short, the "ip route
get" command with iproute2 v. 2.6.35 does not output anything (and
exits with a 0). This breaks (for example) vpnc.

If I use iproute2 v. 2.6.34 everything is OK. This is with a 2.6.35 kernel.

Note: this happens not only using the default Archlinux package but
also if I download and compile the sources.

Please let me know if you need more details.

Best regards,
Fabio


---------------------------------------------------------------------------------------------------------------------------------------------
[root@ratbert] - [/var/cache/pacman/pkg] nslookup www.google.com
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
www.google.com	canonical name = www.l.google.com.
Name:	www.l.google.com
Address: 72.14.234.104

[root@ratbert] - [/var/cache/pacman/pkg] ip route get  72.14.234.104
72.14.234.104 via 192.168.1.1 dev wlan0  src 192.168.1.69
    cache  mtu 1500 advmss 1460 hoplimit 64
[root@ratbert] - [/var/cache/pacman/pkg] pacman -U
iproute2-2.6.35-1-i686.pkg.tar.xz
resolving dependencies...
looking for inter-conflicts...

Targets (1): iproute2-2.6.35-1

Total Download Size:    0.00 MB
Total Installed Size:   1.27 MB

Proceed with installation? [Y/n]
checking package integrity...
(1/1) checking for file conflicts

[############################################################] 100%
(1/1) upgrading iproute2

[############################################################] 100%
[root@ratbert] - [/var/cache/pacman/pkg] ip route get  72.14.234.104
[root@ratbert] - [/var/cache/pacman/pkg]
-------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-08-23 15:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-08 19:33 Latest iproute2 breaks "ip route get" command Andreas Henriksson
2010-08-08 19:31 ` Fabio Comolli
2010-08-08 19:52   ` Andreas Henriksson
2010-08-12  9:02     ` Ulrich Weber
2010-08-12  9:05     ` [PATCH] iproute2: dont filter cached routes on iproute_get Ulrich Weber
2010-08-12  9:12       ` Fabio Comolli
2010-08-12  9:20         ` Ulrich Weber
2010-08-12 18:58           ` Fabio Comolli
2010-08-23 15:15       ` Stephen Hemminger
  -- strict thread matches above, loose matches on Subject: below --
2010-08-08 17:02 Latest iproute2 breaks "ip route get" command Fabio Comolli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.