* [PATCH net-next] Revert "ipv6: Initial skb->dev and skb->protocol in ip6_output"
@ 2017-06-09 19:56 Chenbo Feng
2017-06-10 14:55 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Chenbo Feng @ 2017-06-09 19:56 UTC (permalink / raw)
To: netdev, David Miller; +Cc: Lorenzo Colitti, Eric Dumazet, Chenbo Feng
From: Chenbo Feng <fengc@google.com>
This reverts commit 97a7a37a7b7b("ipv6: Initial skb->dev and
skb->protocol in ip6_output") since it does not handles the
skb->dev assignment inside ip6_fragment() code path properly.
Need to rework and upload again
Fixes: 97a7a37a7b7b("ipv6: Initial skb->dev and skb->protocol in ip6_output")
Signed-off-by: Chenbo Feng <fengc@google.com>
---
net/ipv6/ip6_output.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 02cd44f..bf8a58a 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -67,6 +67,9 @@ static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *
struct in6_addr *nexthop;
int ret;
+ skb->protocol = htons(ETH_P_IPV6);
+ skb->dev = dev;
+
if (ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr)) {
struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb));
@@ -151,9 +154,6 @@ int ip6_output(struct net *net, struct sock *sk, struct sk_buff *skb)
struct net_device *dev = skb_dst(skb)->dev;
struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb));
- skb->protocol = htons(ETH_P_IPV6);
- skb->dev = dev;
-
if (unlikely(idev->cnf.disable_ipv6)) {
IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTDISCARDS);
kfree_skb(skb);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] Revert "ipv6: Initial skb->dev and skb->protocol in ip6_output"
2017-06-09 19:56 [PATCH net-next] Revert "ipv6: Initial skb->dev and skb->protocol in ip6_output" Chenbo Feng
@ 2017-06-10 14:55 ` Eric Dumazet
2017-06-10 19:36 ` Chenbo Feng
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2017-06-10 14:55 UTC (permalink / raw)
To: Chenbo Feng
Cc: netdev, David Miller, Lorenzo Colitti, Eric Dumazet, Chenbo Feng
On Fri, 2017-06-09 at 12:56 -0700, Chenbo Feng wrote:
> From: Chenbo Feng <fengc@google.com>
>
> This reverts commit 97a7a37a7b7b("ipv6: Initial skb->dev and
> skb->protocol in ip6_output") since it does not handles the
> skb->dev assignment inside ip6_fragment() code path properly.
> Need to rework and upload again
We can avoid the revert I believe the patch is fine after analysis.
Please submit this followup, thanks ! :
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 02cd44f0953900108701895108b2fdaa9f9980e5..0d6f3b6345de26c329ae1d6f25dde652a5452d4b 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -869,7 +869,6 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
if (skb->sk && dst_allfrag(skb_dst(skb)))
sk_nocaps_add(skb->sk, NETIF_F_GSO_MASK);
- skb->dev = skb_dst(skb)->dev;
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
err = -EMSGSIZE;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] Revert "ipv6: Initial skb->dev and skb->protocol in ip6_output"
2017-06-10 14:55 ` Eric Dumazet
@ 2017-06-10 19:36 ` Chenbo Feng
0 siblings, 0 replies; 3+ messages in thread
From: Chenbo Feng @ 2017-06-10 19:36 UTC (permalink / raw)
To: Eric Dumazet
Cc: netdev, David Miller, Lorenzo Colitti, Eric Dumazet, Chenbo Feng
On 06/10/2017 07:55 AM, Eric Dumazet wrote:
> On Fri, 2017-06-09 at 12:56 -0700, Chenbo Feng wrote:
>> From: Chenbo Feng <fengc@google.com>
>>
>> This reverts commit 97a7a37a7b7b("ipv6: Initial skb->dev and
>> skb->protocol in ip6_output") since it does not handles the
>> skb->dev assignment inside ip6_fragment() code path properly.
>> Need to rework and upload again
> We can avoid the revert I believe the patch is fine after analysis.
>
> Please submit this followup, thanks ! :
>
> diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> index 02cd44f0953900108701895108b2fdaa9f9980e5..0d6f3b6345de26c329ae1d6f25dde652a5452d4b 100644
> --- a/net/ipv6/ip6_output.c
> +++ b/net/ipv6/ip6_output.c
> @@ -869,7 +869,6 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
> if (skb->sk && dst_allfrag(skb_dst(skb)))
> sk_nocaps_add(skb->sk, NETIF_F_GSO_MASK);
>
> - skb->dev = skb_dst(skb)->dev;
> icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
> err = -EMSGSIZE;
>
>
>
>
Thanks for the help! Patch submitted here:
http://patchwork.ozlabs.org/patch/774260/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-10 19:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-09 19:56 [PATCH net-next] Revert "ipv6: Initial skb->dev and skb->protocol in ip6_output" Chenbo Feng
2017-06-10 14:55 ` Eric Dumazet
2017-06-10 19:36 ` Chenbo Feng
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.