* IPV6 source routing patch is still broken?
@ 2007-04-26 21:53 Chuck Ebbert
2007-04-26 22:04 ` David Miller
2007-04-26 22:31 ` David Miller
0 siblings, 2 replies; 10+ messages in thread
From: Chuck Ebbert @ 2007-04-26 21:53 UTC (permalink / raw)
To: YOSHIFUJI Hideaki; +Cc: Netdev
Looking at the patch that went into 2.6.20.9, I can't see
how type 2 packets get through at all. Shouldn't this part
read:
+ case IPV6_SRCRT_TYPE_2:
+ if (accept_source_route >= 0)
+ break;
+ kfree_skb(skb);
+ return -1;
+ case IPV6_SRCRT_TYPE_0:
+ if (accept_source_route > 0)
+ break;
+ kfree_skb(skb);
+ return -1;
And what does this do?
+ switch (hdr->type) {
+#ifdef CONFIG_IPV6_MIP6
+ break;
+#endif
break by itself like that doesn't do anything. If it did
then people with mobile ipv6 enabled would always accept all
source routing. (They should at least know that's a problem.)
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: IPV6 source routing patch is still broken?
2007-04-26 21:53 IPV6 source routing patch is still broken? Chuck Ebbert
@ 2007-04-26 22:04 ` David Miller
2007-04-26 23:10 ` Chuck Ebbert
2007-04-26 22:31 ` David Miller
1 sibling, 1 reply; 10+ messages in thread
From: David Miller @ 2007-04-26 22:04 UTC (permalink / raw)
To: cebbert; +Cc: yoshfuji, netdev
From: Chuck Ebbert <cebbert@redhat.com>
Date: Thu, 26 Apr 2007 17:53:58 -0400
> And what does this do?
>
> + switch (hdr->type) {
> +#ifdef CONFIG_IPV6_MIP6
> + break;
> +#endif
>
> break by itself like that doesn't do anything. If it did
> then people with mobile ipv6 enabled would always accept all
> source routing. (They should at least know that's a problem.)
We are aware of this part already, and I've sent the fix to
the -stable folks and Linus so we can figure out how to deal
with this and the netlink OOPS'er too.
To be honest I don't blame anyone but the compiler, it shouldn't
accept that code without at least a warning.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: IPV6 source routing patch is still broken?
2007-04-26 22:04 ` David Miller
@ 2007-04-26 23:10 ` Chuck Ebbert
2007-04-26 23:52 ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-27 2:29 ` David Miller
0 siblings, 2 replies; 10+ messages in thread
From: Chuck Ebbert @ 2007-04-26 23:10 UTC (permalink / raw)
To: David Miller; +Cc: yoshfuji, netdev
David Miller wrote:
> From: Chuck Ebbert <cebbert@redhat.com>
> Date: Thu, 26 Apr 2007 17:53:58 -0400
>
>> And what does this do?
>>
>> + switch (hdr->type) {
>> +#ifdef CONFIG_IPV6_MIP6
>> + break;
>> +#endif
>>
>> break by itself like that doesn't do anything. If it did
>> then people with mobile ipv6 enabled would always accept all
>> source routing. (They should at least know that's a problem.)
>
> We are aware of this part already, and I've sent the fix to
> the -stable folks and Linus so we can figure out how to deal
> with this and the netlink OOPS'er too.
>
Another question: is it a good idea to even be shipping release
kernels with Mobile IPV6 enabled? Unfortunately, "experimental"
isn't enough to go by...
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: IPV6 source routing patch is still broken?
2007-04-26 23:10 ` Chuck Ebbert
@ 2007-04-26 23:52 ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-27 2:29 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-04-26 23:52 UTC (permalink / raw)
To: cebbert; +Cc: davem, netdev, yoshfuji, nakam
In article <46313180.6040809@redhat.com> (at Thu, 26 Apr 2007 19:10:56 -0400), Chuck Ebbert <cebbert@redhat.com> says:
> Another question: is it a good idea to even be shipping release
> kernels with Mobile IPV6 enabled? Unfortunately, "experimental"
> isn't enough to go by...
Well, we have still 2 missing pieces in 2.6.21, and we are trying to
push them (source address selection, which is already in net-2.6 and
xfrm subpolicy, which is still on dave's backlog?) to 2.6.22.
After 2.6.23, we would say yes.
--yoshfuji
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IPV6 source routing patch is still broken?
2007-04-26 23:10 ` Chuck Ebbert
2007-04-26 23:52 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-04-27 2:29 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2007-04-27 2:29 UTC (permalink / raw)
To: cebbert; +Cc: yoshfuji, netdev
From: Chuck Ebbert <cebbert@redhat.com>
Date: Thu, 26 Apr 2007 19:10:56 -0400
> Another question: is it a good idea to even be shipping release
> kernels with Mobile IPV6 enabled? Unfortunately, "experimental"
> isn't enough to go by...
There are no known issues in the mobile-ipv6 code to
my knowledge. At least no OOPS'ers or anything like
that.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IPV6 source routing patch is still broken?
2007-04-26 21:53 IPV6 source routing patch is still broken? Chuck Ebbert
2007-04-26 22:04 ` David Miller
@ 2007-04-26 22:31 ` David Miller
2007-04-26 22:57 ` Chuck Ebbert
1 sibling, 1 reply; 10+ messages in thread
From: David Miller @ 2007-04-26 22:31 UTC (permalink / raw)
To: cebbert; +Cc: yoshfuji, netdev
From: Chuck Ebbert <cebbert@redhat.com>
Date: Thu, 26 Apr 2007 17:53:58 -0400
> Looking at the patch that went into 2.6.20.9, I can't see
> how type 2 packets get through at all. Shouldn't this part
> read:
>
> + case IPV6_SRCRT_TYPE_2:
> + if (accept_source_route >= 0)
> + break;
> + kfree_skb(skb);
> + return -1;
> + case IPV6_SRCRT_TYPE_0:
> + if (accept_source_route > 0)
> + break;
> + kfree_skb(skb);
> + return -1;
Yes, that looks like it matches the sysctl documentation more closely:
accept_source_route - INTEGER
Accept source routing (routing extension header).
> 0: Accept routing header.
= 0: Accept only routing header type 2.
< 0: Do not accept routing header.
Type 2 packets should get through as long as the value of the sysctl
is not negative.
Hmmm?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IPV6 source routing patch is still broken?
2007-04-26 22:31 ` David Miller
@ 2007-04-26 22:57 ` Chuck Ebbert
2007-04-27 9:08 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Chuck Ebbert @ 2007-04-26 22:57 UTC (permalink / raw)
To: David Miller; +Cc: yoshfuji, netdev, Sergey Vlasov
David Miller wrote:
>> + case IPV6_SRCRT_TYPE_2:
>> + if (accept_source_route >= 0)
>> + break;
>> + kfree_skb(skb);
>> + return -1;
>> + case IPV6_SRCRT_TYPE_0:
>> + if (accept_source_route > 0)
>> + break;
>> + kfree_skb(skb);
>> + return -1;
>
> Yes, that looks like it matches the sysctl documentation more closely:
>
> accept_source_route - INTEGER
> Accept source routing (routing extension header).
>
> > 0: Accept routing header.
> = 0: Accept only routing header type 2.
> < 0: Do not accept routing header.
>
> Type 2 packets should get through as long as the value of the sysctl
> is not negative.
It was Sergey Vlasov who first found this. I had tried to find his original
message but I was searching the wrong place.
Sergey, you should send networking-related messages to netdev.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IPV6 source routing patch is still broken?
2007-04-26 22:57 ` Chuck Ebbert
@ 2007-04-27 9:08 ` David Miller
2007-04-27 9:36 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2007-04-27 9:08 UTC (permalink / raw)
To: cebbert; +Cc: yoshfuji, netdev, vsu
From: Chuck Ebbert <cebbert@redhat.com>
Date: Thu, 26 Apr 2007 18:57:06 -0400
> David Miller wrote:
> >> + case IPV6_SRCRT_TYPE_2:
> >> + if (accept_source_route >= 0)
> >> + break;
> >> + kfree_skb(skb);
> >> + return -1;
> >> + case IPV6_SRCRT_TYPE_0:
> >> + if (accept_source_route > 0)
> >> + break;
> >> + kfree_skb(skb);
> >> + return -1;
> >
> > Yes, that looks like it matches the sysctl documentation more closely:
> >
> > accept_source_route - INTEGER
> > Accept source routing (routing extension header).
> >
> > > 0: Accept routing header.
> > = 0: Accept only routing header type 2.
> > < 0: Do not accept routing header.
> >
> > Type 2 packets should get through as long as the value of the sysctl
> > is not negative.
>
> It was Sergey Vlasov who first found this. I had tried to find his original
> message but I was searching the wrong place.
Actually, earlier in the function accept_source_route is
verified, and if it is negative ipv6_rthdr_rcv() returns
immediately. This is done by the initial code which reads:
if (accept_source_route < 0 ||
((idev = in6_dev_get(skb->dev)) == NULL)) {
kfree_skb(skb);
return -1;
}
if (idev->cnf.accept_source_route < 0) {
in6_dev_put(idev);
kfree_skb(skb);
return -1;
}
then the function proceeds to use the largest of
'accept_source_route' and 'idev->cnf.accept_source_route'
for further checks.
So when we get to the switch statement in question, we know
it will be a positive value, so none of the purely negative
cases need to be considered.
So with Yoshifuji-sans small fix, the switch statement
covers all the cases properly:
switch (hdr->type) {
#ifdef CONFIG_IPV6_MIP6
case IPV6_SRCRT_TYPE_2:
break;
#endif
case IPV6_SRCRT_TYPE_0:
if (accept_source_route > 0)
break;
kfree_skb(skb);
return -1;
default:
IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
IPSTATS_MIB_INHDRERRORS);
icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, (&hdr->type) - skb->nh.raw);
return -1;
}
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: IPV6 source routing patch is still broken?
2007-04-27 9:08 ` David Miller
@ 2007-04-27 9:36 ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-27 9:41 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-04-27 9:36 UTC (permalink / raw)
To: davem; +Cc: cebbert, netdev, vsu, yoshfuji
In article <20070427.020805.88703639.davem@davemloft.net> (at Fri, 27 Apr 2007 02:08:05 -0700 (PDT)), David Miller <davem@davemloft.net> says:
> then the function proceeds to use the largest of
> 'accept_source_route' and 'idev->cnf.accept_source_route'
> for further checks.
Smallest:
if (accept_source_route > idev->cnf.accept_source_route)
accept_source_route = idev->cnf.accept_source_route;
--yoshufji
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: IPV6 source routing patch is still broken?
2007-04-27 9:36 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-04-27 9:41 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2007-04-27 9:41 UTC (permalink / raw)
To: yoshfuji; +Cc: cebbert, netdev, vsu
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Fri, 27 Apr 2007 18:36:35 +0900 (JST)
> In article <20070427.020805.88703639.davem@davemloft.net> (at Fri, 27 Apr 2007 02:08:05 -0700 (PDT)), David Miller <davem@davemloft.net> says:
>
> > then the function proceeds to use the largest of
> > 'accept_source_route' and 'idev->cnf.accept_source_route'
> > for further checks.
>
> Smallest:
> if (accept_source_route > idev->cnf.accept_source_route)
> accept_source_route = idev->cnf.accept_source_route;
Correct, my mistake.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-04-27 9:41 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 21:53 IPV6 source routing patch is still broken? Chuck Ebbert
2007-04-26 22:04 ` David Miller
2007-04-26 23:10 ` Chuck Ebbert
2007-04-26 23:52 ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-27 2:29 ` David Miller
2007-04-26 22:31 ` David Miller
2007-04-26 22:57 ` Chuck Ebbert
2007-04-27 9:08 ` David Miller
2007-04-27 9:36 ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-27 9:41 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).