1. 06 May, 2019 1 commit
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 1ffad6d1
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ===================
      Netfilter updates for net-next
      
      The following batch contains Netfilter updates for net-next, they are:
      
      1) Move nft_expr_clone() to nft_dynset, from Paul Gortmaker.
      
      2) Do not include module.h from net/netfilter/nf_tables.h,
         also from Paul.
      
      3) Restrict conntrack sysctl entries to boolean, from Tonghao Zhang.
      
      4) Several patches to add infrastructure to autoload NAT helper
         modules from their respective conntrack helper, this also includes
         the first client of this code in OVS, patches from Flavio Leitner.
      
      5) Add support to match for conntrack ID, from Brett Mastbergen.
      
      6) Spelling fix in connlabel, from Colin Ian King.
      
      7) Use struct_size() from hashlimit, from Gustavo A. R. Silva.
      
      8) Add optimized version of nf_inet_addr_mask(), from Li RongQing.
      ===================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ffad6d1
  2. 05 May, 2019 28 commits
  3. 04 May, 2019 11 commits
    • Eelco Chaudron's avatar
      net: openvswitch: return an error instead of doing BUG_ON() · a734d1f4
      Eelco Chaudron authored
      For all other error cases in queue_userspace_packet() the error is
      returned, so it makes sense to do the same for these two error cases.
      Reported-by: default avatarDavide Caratti <dcaratti@redhat.com>
      Signed-off-by: default avatarEelco Chaudron <echaudro@redhat.com>
      Acked-by: default avatarFlavio Leitner <fbl@sysclose.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a734d1f4
    • Heiner Kallweit's avatar
      r8169: remove rtl_write_exgmac_batch · 3aa4c491
      Heiner Kallweit authored
      rtl_write_exgmac_batch is used in only one place, so we can remove it.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3aa4c491
    • David S. Miller's avatar
      Merge branch 'netlink-strict-attribute-checking-follow-up' · 8cca3397
      David S. Miller authored
      Michal Kubecek says:
      
      ====================
      netlink: strict attribute checking follow-up
      
      Three follow-up patches for recent strict netlink validation series.
      
      Patch 1 fixes dump handling for genetlink families which validate and parse
      messages themselves (e.g. because they need different policies for diferent
      commands).
      
      Patch 2 sets bad_attr in extack in one place where this was omitted.
      
      Patch 3 adds new NL_VALIDATE_NESTED flags for strict validation to enable
      checking that NLA_F_NESTED value in received messages matches expectations
      and includes this flag in NL_VALIDATE_STRICT. This would change userspace
      visible behavior but the previous switching to NL_VALIDATE_STRICT for new
      code is still only in net-next at the moment.
      
      v2: change error messages to mention NLA_F_NESTED explicitly
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8cca3397
    • Michal Kubecek's avatar
      netlink: add validation of NLA_F_NESTED flag · b424e432
      Michal Kubecek authored
      Add new validation flag NL_VALIDATE_NESTED which adds three consistency
      checks of NLA_F_NESTED_FLAG:
      
        - the flag is set on attributes with NLA_NESTED{,_ARRAY} policy
        - the flag is not set on attributes with other policies except NLA_UNSPEC
        - the flag is set on attribute passed to nla_parse_nested()
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      
      v2: change error messages to mention NLA_F_NESTED explicitly
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b424e432
    • Michal Kubecek's avatar
      netlink: set bad attribute also on maxtype check · d54a16b2
      Michal Kubecek authored
      The check that attribute type is within 0...maxtype range in
      __nla_validate_parse() sets only error message but not bad_attr in extack.
      Set also bad_attr to tell userspace which attribute failed validation.
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d54a16b2
    • Michal Kubecek's avatar
      genetlink: do not validate dump requests if there is no policy · 05d7f547
      Michal Kubecek authored
      Unlike do requests, dump genetlink requests now perform strict validation
      by default even if the genetlink family does not set policy and maxtype
      because it does validation and parsing on its own (e.g. because it wants to
      allow different message format for different commands). While the null
      policy will be ignored, maxtype (which would be zero) is still checked so
      that any attribute will fail validation.
      
      The solution is to only call __nla_validate() from genl_family_rcv_msg()
      if family->maxtype is set.
      
      Fixes: ef6243ac ("genetlink: optionally validate strictly/dumps")
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05d7f547
    • David S. Miller's avatar
      Merge branch 'mlxsw-Firmware-version-update' · 5eabc27d
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      mlxsw: Firmware version update
      
      This patchset updates mlxsw to use a new firmware version and adds
      support for split into two ports on Spectrum-2 based systems.
      
      Patch #1 updates the firmware version to 13.2000.1122
      
      Patch #2 queries new resources from the firmware.
      
      Patch #3 makes use of these resources in order to support split into two
      ports on Spectrum-2 based systems. The need for these resources is
      explained by Shalom:
      
      When splitting a port, different local ports need to be mapped on different
      systems. For example:
      
      SN3700 (local_ports_in_2x=2):
        * Without split:
            front panel 1   --> local port 1
            front panel 2   --> local port 5
        * Split to 2:
            front panel 1s0 --> local port 1
            front panel 1s1 --> local port 3
            front panel 2   --> local port 5
      
      SN3800 (local_ports_in_2x=1):
        * Without split:
            front panel 1 --> local port 1
            front panel 2 --> local port 3
        * Split to 2:
            front panel 1s0 --> local port 1
            front panel 1s1 --> local port 2
            front panel 2   --> local port 3
      
      The local_ports_in_{1x, 2x} resources provide the offsets from the base
      local ports according to which the new local ports can be calculated.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5eabc27d
    • Shalom Toledo's avatar
      mlxsw: spectrum: split base on local_ports_in_{1x, 2x} resources · fd321c6c
      Shalom Toledo authored
      When splitting a port, different local ports need to be mapped on different
      systems. For example:
      
      SN3700 (local_ports_in_2x=2):
        * Without split:
            front panel 1   --> local port 1
            front panel 2   --> local port 5
        * Split to 2:
            front panel 1s0 --> local port 1
            front panel 1s1 --> local port 3
            front panel 2   --> local port 5
      
      SN3800 (local_ports_in_2x=1):
        * Without split:
            front panel 1 --> local port 1
            front panel 2 --> local port 3
        * Split to 2:
            front panel 1s0 --> local port 1
            front panel 1s1 --> local port 2
            front panel 2   --> local port 3
      
      The local_ports_in_{1x, 2x} resources provide the offsets from the base
      local ports according to which the new local ports can be calculated.
      Signed-off-by: default avatarShalom Toledo <shalomt@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd321c6c
    • Shalom Toledo's avatar
      mlxsw: resources: Add local_ports_in_{1x, 2x} · 4fa050d2
      Shalom Toledo authored
      Since the number of local ports in 4x changed between SPC and SPC-2,
      firmware expose new resources that the driver can query.
      Signed-off-by: default avatarShalom Toledo <shalomt@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4fa050d2
    • Ido Schimmel's avatar
      mlxsw: Bump firmware version to 13.2000.1122 · 913e89a4
      Ido Schimmel authored
      The new version supports two features that are required by upcoming
      changes in the driver:
      
      * Querying of new resources allowing port split into two ports on
      Spectrum-2 systems
      
      * Querying of number of gearboxes on supported systems such as SN3800
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      913e89a4
    • Tuong Lien's avatar
      tipc: fix missing Name entries due to half-failover · c0b14a08
      Tuong Lien authored
      TIPC link can temporarily fall into "half-establish" that only one of
      the link endpoints is ESTABLISHED and starts to send traffic, PROTOCOL
      messages, whereas the other link endpoint is not up (e.g. immediately
      when the endpoint receives ACTIVATE_MSG, the network interface goes
      down...).
      
      This is a normal situation and will be settled because the link
      endpoint will be eventually brought down after the link tolerance time.
      
      However, the situation will become worse when the second link is
      established before the first link endpoint goes down,
      For example:
      
         1. Both links <1A-2A>, <1B-2B> down
         2. Link endpoint 2A up, but 1A still down (e.g. due to network
            disturbance, wrong session, etc.)
         3. Link <1B-2B> up
         4. Link endpoint 2A down (e.g. due to link tolerance timeout)
         5. Node B starts failover onto link <1B-2B>
      
         ==> Node A does never start link failover.
      
      When the "half-failover" situation happens, two consequences have been
      observed:
      
      a) Peer link/node gets stuck in FAILINGOVER state;
      b) Traffic or user messages that peer node is trying to failover onto
      the second link can be partially or completely dropped by this node.
      
      The consequence a) was actually solved by commit c140eb16 ("tipc:
      fix failover problem"), but that commit didn't cover the b). It's due
      to the fact that the tunnel link endpoint has never been prepared for a
      failover, so the 'l->drop_point' (and the other data...) is not set
      correctly. When a TUNNEL_MSG from peer node arrives on the link,
      depending on the inner message's seqno and the current 'l->drop_point'
      value, the message can be dropped (- treated as a duplicate message) or
      processed.
      At this early stage, the traffic messages from peer are likely to be
      NAME_DISTRIBUTORs, this means some name table entries will be missed on
      the node forever!
      
      The commit resolves the issue by starting the FAILOVER process on this
      node as well. Another benefit from this solution is that we ensure the
      link will not be re-established until the failover ends.
      Acked-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarTuong Lien <tuong.t.lien@dektech.com.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0b14a08