1. 08 Apr, 2020 10 commits
    • René van Dorst's avatar
      net: dsa: mt7530: move mt7623 settings out off the mt7530 · 84d2f7b7
      René van Dorst authored
      Moving mt7623 logic out off mt7530, is required to make hardware setting
      consistent after we introduce phylink to mtk driver.
      
      Fixes: ca366d6c ("net: dsa: mt7530: Convert to PHYLINK API")
      Reviewed-by: default avatarSean Wang <sean.wang@mediatek.com>
      Tested-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarRené van Dorst <opensource@vdorst.com>
      Tested-by: default avatarFrank Wunderlich <frank-w@public-files.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84d2f7b7
    • Tim Stallard's avatar
      net: ipv6: do not consider routes via gateways for anycast address check · 03e2a984
      Tim Stallard authored
      The behaviour for what is considered an anycast address changed in
      commit 45e4fd26 ("ipv6: Only create RTF_CACHE routes after
      encountering pmtu exception"). This now considers the first
      address in a subnet where there is a route via a gateway
      to be an anycast address.
      
      This breaks path MTU discovery and traceroutes when a host in a
      remote network uses the address at the start of a prefix
      (eg 2600:: advertised as 2600::/48 in the DFZ) as ICMP errors
      will not be sent to anycast addresses.
      
      This patch excludes any routes with a gateway, or via point to
      point links, like the behaviour previously from
      rt6_is_gw_or_nonexthop in net/ipv6/route.c.
      
      This can be tested with:
      ip link add v1 type veth peer name v2
      ip netns add test
      ip netns exec test ip link set lo up
      ip link set v2 netns test
      ip link set v1 up
      ip netns exec test ip link set v2 up
      ip addr add 2001:db8::1/64 dev v1 nodad
      ip addr add 2001:db8:100:: dev lo nodad
      ip netns exec test ip addr add 2001:db8::2/64 dev v2 nodad
      ip netns exec test ip route add unreachable 2001:db8:1::1
      ip netns exec test ip route add 2001:db8:100::/64 via 2001:db8::1
      ip netns exec test sysctl net.ipv6.conf.all.forwarding=1
      ip route add 2001:db8:1::1 via 2001:db8::2
      ping -I 2001:db8::1 2001:db8:1::1 -c1
      ping -I 2001:db8:100:: 2001:db8:1::1 -c1
      ip addr delete 2001:db8:100:: dev lo
      ip netns delete test
      
      Currently the first ping will get back a destination unreachable ICMP
      error, but the second will never get a response, with "icmp6_send:
      acast source" logged. After this patch, both get destination
      unreachable ICMP replies.
      
      Fixes: 45e4fd26 ("ipv6: Only create RTF_CACHE routes after encountering pmtu exception")
      Signed-off-by: default avatarTim Stallard <code@timstallard.me.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03e2a984
    • Tim Stallard's avatar
      net: icmp6: do not select saddr from iif when route has prefsrc set · b93cfb9c
      Tim Stallard authored
      Since commit fac6fce9 ("net: icmp6: provide input address for
      traceroute6") ICMPv6 errors have source addresses from the ingress
      interface. However, this overrides when source address selection is
      influenced by setting preferred source addresses on routes.
      
      This can result in ICMP errors being lost to upstream BCP38 filters
      when the wrong source addresses are used, breaking path MTU discovery
      and traceroute.
      
      This patch sets the modified source address selection to only take place
      when the route used has no prefsrc set.
      
      It can be tested with:
      
      ip link add v1 type veth peer name v2
      ip netns add test
      ip netns exec test ip link set lo up
      ip link set v2 netns test
      ip link set v1 up
      ip netns exec test ip link set v2 up
      ip addr add 2001:db8::1/64 dev v1 nodad
      ip addr add 2001:db8::3 dev v1 nodad
      ip netns exec test ip addr add 2001:db8::2/64 dev v2 nodad
      ip netns exec test ip route add unreachable 2001:db8:1::1
      ip netns exec test ip addr add 2001:db8:100::1 dev lo
      ip netns exec test ip route add 2001:db8::1 dev v2 src 2001:db8:100::1
      ip route add 2001:db8:1000::1 via 2001:db8::2
      traceroute6 -s 2001:db8::1 2001:db8:1000::1
      traceroute6 -s 2001:db8::3 2001:db8:1000::1
      ip netns delete test
      
      Output before:
      $ traceroute6 -s 2001:db8::1 2001:db8:1000::1
      traceroute to 2001:db8:1000::1 (2001:db8:1000::1), 30 hops max, 80 byte packets
       1  2001:db8::2 (2001:db8::2)  0.843 ms !N  0.396 ms !N  0.257 ms !N
      $ traceroute6 -s 2001:db8::3 2001:db8:1000::1
      traceroute to 2001:db8:1000::1 (2001:db8:1000::1), 30 hops max, 80 byte packets
       1  2001:db8::2 (2001:db8::2)  0.772 ms !N  0.257 ms !N  0.357 ms !N
      
      After:
      $ traceroute6 -s 2001:db8::1 2001:db8:1000::1
      traceroute to 2001:db8:1000::1 (2001:db8:1000::1), 30 hops max, 80 byte packets
       1  2001:db8:100::1 (2001:db8:100::1)  8.885 ms !N  0.310 ms !N  0.174 ms !N
      $ traceroute6 -s 2001:db8::3 2001:db8:1000::1
      traceroute to 2001:db8:1000::1 (2001:db8:1000::1), 30 hops max, 80 byte packets
       1  2001:db8::2 (2001:db8::2)  1.403 ms !N  0.205 ms !N  0.313 ms !N
      
      Fixes: fac6fce9 ("net: icmp6: provide input address for traceroute6")
      Signed-off-by: default avatarTim Stallard <code@timstallard.me.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b93cfb9c
    • David S. Miller's avatar
      Merge branch 'fec-fix-wake-on-lan' · 860c2bf0
      David S. Miller authored
      Martin Fuzzey says:
      
      ====================
      Fix Wake on lan with FEC on i.MX6
      
      This series fixes WoL support with the FEC on i.MX6
      The support was already in mainline but seems to have bitrotted
      somewhat.
      
      Only tested with i.MX6DL
      
      Changes V2->V3
      	Patch 1:
      		fix non initialized variable introduced in V2 causing
      		probe to sometimes fail.
      
      	Patch 2:
      		remove /delete-property/interrupts-extended in
      		arch/arm/boot/dts/imx6qp.dtsi.
      
      	Patches 3 and 4:
      		Add received Acked-by and RB tags.
      
      Changes V1->V2
      	Move the register offset and bit number from the DT to driver code
      	Add SOB from Fugang Duan for the NXP code on which this is based
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      860c2bf0
    • Martin Fuzzey's avatar
      ARM: dts: imx6: add fec gpr property. · be8ae92f
      Martin Fuzzey authored
      This is required for wake on lan on i.MX6
      Signed-off-by: default avatarMartin Fuzzey <martin.fuzzey@flowbird.group>
      Reviewed-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be8ae92f
    • Martin Fuzzey's avatar
      dt-bindings: fec: document the new gpr property. · 70f26858
      Martin Fuzzey authored
      This property allows the gpr register bit to be defined
      for wake on lan support.
      Signed-off-by: default avatarMartin Fuzzey <martin.fuzzey@flowbird.group>
      Reviewed-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70f26858
    • Martin Fuzzey's avatar
      ARM: dts: imx6: Use gpc for FEC interrupt controller to fix wake on LAN. · 4141f1a4
      Martin Fuzzey authored
      In order to wake from suspend by ethernet magic packets the GPC
      must be used as intc does not have wakeup functionality.
      
      But the FEC DT node currently uses interrupt-extended,
      specificying intc, thus breaking WoL.
      
      This problem is probably fallout from the stacked domain conversion
      as intc used to chain to GPC.
      
      So replace "interrupts-extended" by "interrupts" to use the default
      parent which is GPC.
      
      Fixes: b923ff6a ("ARM: imx6: convert GPC to stacked domains")
      Signed-off-by: default avatarMartin Fuzzey <martin.fuzzey@flowbird.group>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4141f1a4
    • Martin Fuzzey's avatar
      net: fec: set GPR bit on suspend by DT configuration. · da722186
      Martin Fuzzey authored
      On some SoCs, such as the i.MX6, it is necessary to set a bit
      in the SoC level GPR register before suspending for wake on lan
      to work.
      
      The fec platform callback sleep_mode_enable was intended to allow this
      but the platform implementation was NAK'd back in 2015 [1]
      
      This means that, currently, wake on lan is broken on mainline for
      the i.MX6 at least.
      
      So implement the required bit setting in the fec driver by itself
      by adding a new optional DT property indicating the GPR register
      and adding the offset and bit information to the driver.
      
      [1] https://www.spinics.net/lists/netdev/msg310922.htmlSigned-off-by: default avatarMartin Fuzzey <martin.fuzzey@flowbird.group>
      Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da722186
    • Lothar Rubusch's avatar
      net: sock.h: fix skb_steal_sock() kernel-doc · 045065f0
      Lothar Rubusch authored
      Fix warnings related to kernel-doc notation, and wording in
      function description.
      Signed-off-by: default avatarLothar Rubusch <l.rubusch@gmail.com>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Tested-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      045065f0
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · c2c11289
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net, they are:
      
      1) Fix spurious overlap condition in the rbtree tree, from Stefano Brivio.
      
      2) Fix possible uninitialized pointer dereference in nft_lookup.
      
      3) IDLETIMER v1 target matches the Android layout, from
         Maciej Zenczykowski.
      
      4) Dangling pointer in nf_tables_set_alloc_name, from Eric Dumazet.
      
      5) Fix RCU warning splat in ipset find_set_type(), from Amol Grover.
      
      6) Report EOPNOTSUPP on unsupported set flags and object types in sets.
      
      7) Add NFT_SET_CONCAT flag to provide consistent error reporting
         when users defines set with ranges in concatenations in old kernels.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2c11289
  2. 07 Apr, 2020 30 commits