Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290393

[PATCH 4.3 11/71] Revert "ipv6: ndisc: inherit metadata dst when creating ndisc requests"

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.3 11/71] Revert "ipv6: ndisc: inherit metadata dst when creating ndisc requests"
Date 2015-12-12 21:30 +0100
Message-ID <qEYXP-6UZ-83@gated-at.bofh.it> (permalink)
References <qEYO5-6QW-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.3-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>

[ Upstream commit 304d888b29cf96f1dd53511ee686499cd8cdf249 ]

This reverts commit ab450605b35caa768ca33e86db9403229bf42be4.

In IPv6, we cannot inherit the dst of the original dst. ndisc packets
are IPv6 packets and may take another route than the original packet.

This patch breaks the following scenario: a packet comes from eth0 and
is forwarded through vxlan1. The encapsulated packet triggers an NS
which cannot be sent because of the wrong route.

CC: Jiri Benc <jbenc@redhat.com>
CC: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/net/ndisc.h |    3 +--
 net/ipv6/addrconf.c |    2 +-
 net/ipv6/ndisc.c    |   10 +++-------
 net/ipv6/route.c    |    2 +-
 4 files changed, 6 insertions(+), 11 deletions(-)

--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -182,8 +182,7 @@ int ndisc_rcv(struct sk_buff *skb);
 
 void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
 		   const struct in6_addr *solicit,
-		   const struct in6_addr *daddr, const struct in6_addr *saddr,
-		   struct sk_buff *oskb);
+		   const struct in6_addr *daddr, const struct in6_addr *saddr);
 
 void ndisc_send_rs(struct net_device *dev,
 		   const struct in6_addr *saddr, const struct in6_addr *daddr);
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3628,7 +3628,7 @@ static void addrconf_dad_work(struct wor
 
 	/* send a neighbour solicitation for our addr */
 	addrconf_addr_solict_mult(&ifp->addr, &mcaddr);
-	ndisc_send_ns(ifp->idev->dev, NULL, &ifp->addr, &mcaddr, &in6addr_any, NULL);
+	ndisc_send_ns(ifp->idev->dev, NULL, &ifp->addr, &mcaddr, &in6addr_any);
 out:
 	in6_ifa_put(ifp);
 	rtnl_unlock();
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -553,8 +553,7 @@ static void ndisc_send_unsol_na(struct n
 
 void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
 		   const struct in6_addr *solicit,
-		   const struct in6_addr *daddr, const struct in6_addr *saddr,
-		   struct sk_buff *oskb)
+		   const struct in6_addr *daddr, const struct in6_addr *saddr)
 {
 	struct sk_buff *skb;
 	struct in6_addr addr_buf;
@@ -590,9 +589,6 @@ void ndisc_send_ns(struct net_device *de
 		ndisc_fill_addr_option(skb, ND_OPT_SOURCE_LL_ADDR,
 				       dev->dev_addr);
 
-	if (!(dev->priv_flags & IFF_XMIT_DST_RELEASE) && oskb)
-		skb_dst_copy(skb, oskb);
-
 	ndisc_send_skb(skb, daddr, saddr);
 }
 
@@ -679,12 +675,12 @@ static void ndisc_solicit(struct neighbo
 				  "%s: trying to ucast probe in NUD_INVALID: %pI6\n",
 				  __func__, target);
 		}
-		ndisc_send_ns(dev, neigh, target, target, saddr, skb);
+		ndisc_send_ns(dev, neigh, target, target, saddr);
 	} else if ((probes -= NEIGH_VAR(neigh->parms, APP_PROBES)) < 0) {
 		neigh_app_ns(neigh);
 	} else {
 		addrconf_addr_solict_mult(target, &mcaddr);
-		ndisc_send_ns(dev, NULL, target, &mcaddr, saddr, skb);
+		ndisc_send_ns(dev, NULL, target, &mcaddr, saddr);
 	}
 }
 
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -546,7 +546,7 @@ static void rt6_probe_deferred(struct wo
 		container_of(w, struct __rt6_probe_work, work);
 
 	addrconf_addr_solict_mult(&work->target, &mcaddr);
-	ndisc_send_ns(work->dev, NULL, &work->target, &mcaddr, NULL, NULL);
+	ndisc_send_ns(work->dev, NULL, &work->target, &mcaddr, NULL);
 	dev_put(work->dev);
 	kfree(work);
 }


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.3 00/71] 4.3.3-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 15/71] packet: only allow extra vlan len on ethernet devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 14/71] packet: always probe for transport header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 07/71] af-unix: passcred support for sendpage Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 17/71] packet: fix tpacket_snd max frame len Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 06/71] unix: avoid use-after-free in ep_remove_wait_queue Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 02/71] r8169: fix kasan reported skb use-after-free. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 08/71] ipv6: Avoid creating RTF_CACHE from a rt that is not managed by fib6 tree Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 12/71] tools/net: Use include/uapi with __EXPORTED_HEADERS__ Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 09/71] ipv6: Check expire on DST_NOCACHE route Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:20 +0100
  [PATCH 4.3 31/71] net, scm: fix PaX detected msg_controllen overflow in scm_detach_fds Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 62/71] debugfs: fix refcount imbalance in start_creating Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 04/71] af_unix: dont append consumed skbs to sk_receive_queue Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 29/71] tcp: fix potential huge kmalloc() calls in TCP_REPAIR Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 25/71] net/ip6_tunnel: fix dst leak Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 03/71] af-unix: fix use-after-free with concurrent readers while splicing Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 24/71] snmp: Remove duplicate OUTMCAST stat increment Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 36/71] tipc: fix error handling of expanding buffer headroom Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
    Re: [PATCH 4.3 36/71] tipc: fix error handling of expanding buffer  headroom Ben Hutchings <ben@decadent.org.uk> - 2015-12-14 18:50 +0100
      Re: [PATCH 4.3 36/71] tipc: fix error handling of expanding buffer  headroom Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-15 01:00 +0100
  [PATCH 4.3 16/71] packet: infer protocol from ethernet header if unset Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 66/71] ocfs2: fix umask ignored issue Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 64/71] nfs4: resend LAYOUTGET when there is a race that changes the seqid Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 10/71] ipv6: Check rt->dst.from for the DST_NOCACHE route Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 01/71] certs: add .gitignore to stop git nagging about x509_certificate_list Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 52/71] Btrfs: fix race when listing an inodes xattrs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 67/71] block: fix segment split Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 63/71] nfs4: start callback_ident at idr 1 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 65/71] nfs: if we have no valid attrs, then dont declare the attribute cache valid Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 05/71] af_unix: take receive queue lock while appending new skb Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 61/71] nfsd: eliminate sending duplicate and repeated delegations Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 11/71] Revert "ipv6: ndisc: inherit metadata dst when creating ndisc requests" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:30 +0100
  [PATCH 4.3 21/71] ip_tunnel: disable preemption when updating per-cpu tstats Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 55/71] ext4 crypto: fix memory leak in ext4_bio_write_page() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 39/71] bpf, array: fix heap out-of-bounds access when updating elements Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 54/71] rbd: dont put snap_context twice in rbd_queue_workfn() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 50/71] Btrfs: fix race leading to incorrect item deletion when dropping extents Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 35/71] broadcom: fix PHY_ID_BCM5481 entry in the id table Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 57/71] ext4: fix potential use after free in __ext4_journal_stop Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 48/71] Btrfs: fix truncation of compressed and inlined extents Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 41/71] net/neighbour: fix crash at dumping device-agnostic proxy entries Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 23/71] net: thunder: Check for driver data in nicvf_remove() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
    RE: [PATCH 4.3 23/71] net: thunder: Check for driver data in  nicvf_remove() Pavel Fedin <p.fedin@samsung.com> - 2015-12-14 08:20 +0100
      Re: [PATCH 4.3 23/71] net: thunder: Check for driver data in  nicvf_remove() 'Greg Kroah-Hartman' <gregkh@linuxfoundation.org> - 2015-12-14 15:20 +0100
        RE: [PATCH 4.3 23/71] net: thunder: Check for driver data in  nicvf_remove() Pavel Fedin <p.fedin@samsung.com> - 2015-12-14 16:00 +0100
  [PATCH 4.3 51/71] Btrfs: fix race leading to BUG_ON when running delalloc for nodatacow Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 56/71] ext4 crypto: fix bugs in ext4_encrypted_zeroout() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 47/71] Btrfs: fix file corruption and data loss after cloning inline extents Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 71/71] [media] cobalt: fix Kconfig dependency Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 34/71] vrf: fix double free and memory corruption on register_netdevice failure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
    Re: [PATCH 4.3 34/71] vrf: fix double free and memory corruption on  register_netdevice failure Ben Hutchings <ben@decadent.org.uk> - 2015-12-14 18:50 +0100
      Re: [PATCH 4.3 34/71] vrf: fix double free and memory corruption on  register_netdevice failure David Ahern <dsa@cumulusnetworks.com> - 2015-12-14 20:00 +0100
        Re: [PATCH 4.3 34/71] vrf: fix double free and memory corruption on  register_netdevice failure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-15 06:50 +0100
          [PATCH 4.3] vrf: Fix memory leak on registration failure in  vrf_newlink() Ben Hutchings <ben@decadent.org.uk> - 2015-12-15 16:20 +0100
            Re: [PATCH 4.3] vrf: Fix memory leak on registration failure in  vrf_newlink() David Miller <davem@davemloft.net> - 2015-12-15 18:50 +0100
  [PATCH 4.3 45/71] btrfs: fix resending received snapshot with parent Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 33/71] net: ip6mr: fix static mfc/dev leaks on table destruction Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 40/71] ipv6: add complete rcu protection around np->opt Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 38/71] RDS: fix race condition when sending a message on unbound socket Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 32/71] net: ipmr: fix static mfc/dev leaks on table destruction Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 46/71] btrfs: check unsupported filters in balance arguments Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 53/71] btrfs: fix signed overflows in btrfs_sync_file Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 44/71] net_sched: fix qdisc_tree_decrease_qlen() races Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 58/71] ext4, jbd2: ensure entering into panic after recording an error in superblock Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 43/71] openvswitch: fix hangup on vxlan/gre/geneve device deletion Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 19/71] net/mlx5e: Added self loopback prevention Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 42/71] ipv6: sctp: implement sctp_v6_destroy_sock() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 20/71] net/mlx4_core: Fix sleeping while holding spinlock at rem_slave_counters Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 59/71] firewire: ohci: fix JMicron JMB38x IT context discovery Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 37/71] ipv6: distinguish frag queues by device for multicast and link-local packets Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 18/71] sctp: translate host order to network order when setting a hmacid Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 22/71] net: switchdev: fix return code of fdb_dump stub Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 60/71] nfsd: serialize state seqid morphing operations Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:40 +0100
  [PATCH 4.3 70/71] ALSA: hda/hdmi - apply Skylake fix-ups to Broxton display codec Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:50 +0100
  [PATCH 4.3 27/71] tcp: md5: fix lockdep annotation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:50 +0100
  [PATCH 4.3 68/71] ceph: fix message length computation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:50 +0100
  [PATCH 4.3 69/71] ALSA: pci: depend on ZONE_DMA Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:50 +0100
  [PATCH 4.3 30/71] tcp: initialize tp->copied_seq in case of cross SYN connection Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:50 +0100
  [PATCH 4.3 28/71] tcp: disable Fast Open on timeouts after handshake Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-12 21:50 +0100
  Re: [PATCH 4.3 00/71] 4.3.3-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-12-13 04:10 +0100
    Re: [PATCH 4.3 00/71] 4.3.3-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-13 04:50 +0100
  Re: [PATCH 4.3 00/71] 4.3.3-stable review Guenter Roeck <linux@roeck-us.net> - 2015-12-13 17:10 +0100
    Re: [PATCH 4.3 00/71] 4.3.3-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-14 04:30 +0100

csiph-web