Message ID | 1302748276.3549.20.camel@edumazet-laptop |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 14 Apr 2011 04:31:16 +0200 Eric Dumazet <eric.dumazet@gmail.com> wrote: > Le mercredi 13 avril 2011 à 14:48 -0700, David Miller a écrit : > > From: Eric Dumazet <eric.dumazet@gmail.com> > > Date: Wed, 13 Apr 2011 17:28:07 +0200 > > > > > Dont worry, Stephen or me will send it asap. > > > > I'm looking forward to it :) > > I was considering another way to handle this problem, > patching ip_options_compile() to take care of null skb_dst() in slow > path instead ? > > What would be the best thing ? > > diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c > index 28a736f..c10ad63 100644 > --- a/net/ipv4/ip_options.c > +++ b/net/ipv4/ip_options.c > @@ -329,7 +329,7 @@ int ip_options_compile(struct net *net, > pp_ptr = optptr + 2; > goto error; > } > - if (skb) { > + if (rt) { > memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4); > opt->is_changed = 1; > } > @@ -371,7 +371,7 @@ int ip_options_compile(struct net *net, > goto error; > } > opt->ts = optptr - iph; > - if (skb) { > + if (rt) { > memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4); > timeptr = (__be32*)&optptr[optptr[2]+3]; > } > I like this because it lets the bridge be transparent. The existing options code adds entry in record route, and which is not desirable. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index 28a736f..c10ad63 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c @@ -329,7 +329,7 @@ int ip_options_compile(struct net *net, pp_ptr = optptr + 2; goto error; } - if (skb) { + if (rt) { memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4); opt->is_changed = 1; } @@ -371,7 +371,7 @@ int ip_options_compile(struct net *net, goto error; } opt->ts = optptr - iph; - if (skb) { + if (rt) { memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4); timeptr = (__be32*)&optptr[optptr[2]+3]; }