1. 09 11月, 2015 1 次提交
  2. 02 9月, 2015 1 次提交
  3. 21 7月, 2015 1 次提交
    • D
      sched: cls_flow: fix panic on filter replace · 32b2f4b1
      Daniel Borkmann 提交于
      The following test case causes a NULL pointer dereference in cls_flow:
      
        tc filter add dev foo parent 1: handle 0x1 flow hash keys dst action ok
        tc filter replace dev foo parent 1: pref 49152 handle 0x1 \
                  flow hash keys mark action drop
      
      To be more precise, actually two different panics are fixed, the first
      occurs because tcf_exts_init() is not called on the newly allocated
      filter when we do a replace. And the second panic uncovered after that
      happens since the arguments of list_replace_rcu() are swapped, the old
      element needs to be the first argument and the new element the second.
      
      Fixes: 70da9f0b ("net: sched: cls_flow use RCU")
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32b2f4b1
  4. 05 6月, 2015 1 次提交
    • T
      net: Add full IPv6 addresses to flow_keys · c3f83241
      Tom Herbert 提交于
      This patch adds full IPv6 addresses into flow_keys and uses them as
      input to the flow hash function. The implementation supports either
      IPv4 or IPv6 addresses in a union, and selector is used to determine
      how may words to input to jhash2.
      
      We also add flow_get_u32_dst and flow_get_u32_src functions which are
      used to get a u32 representation of the source and destination
      addresses. For IPv6, ipv6_addr_hash is called. These functions retain
      getting the legacy values of src and dst in flow_keys.
      
      With this patch, Ethertype and IP protocol are now included in the
      flow hash input.
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c3f83241
  5. 14 5月, 2015 3 次提交
  6. 10 3月, 2015 1 次提交
    • C
      net_sched: destroy proto tp when all filters are gone · 1e052be6
      Cong Wang 提交于
      Kernel automatically creates a tp for each
      (kind, protocol, priority) tuple, which has handle 0,
      when we add a new filter, but it still is left there
      after we remove our own, unless we don't specify the
      handle (literally means all the filters under
      the tuple). For example this one is left:
      
        # tc filter show dev eth0
        filter parent 8001: protocol arp pref 49152 basic
      
      The user-space is hard to clean up these for kernel
      because filters like u32 are organized in a complex way.
      So kernel is responsible to remove it after all filters
      are gone.  Each type of filter has its own way to
      store the filters, so each type has to provide its
      way to check if all filters are gone.
      
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NCong Wang <cwang@twopensource.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: Jamal Hadi Salim<jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e052be6
  7. 14 1月, 2015 1 次提交
  8. 10 12月, 2014 2 次提交
  9. 09 12月, 2014 2 次提交
  10. 08 10月, 2014 1 次提交
    • E
      net: better IFF_XMIT_DST_RELEASE support · 02875878
      Eric Dumazet 提交于
      Testing xmit_more support with netperf and connected UDP sockets,
      I found strange dst refcount false sharing.
      
      Current handling of IFF_XMIT_DST_RELEASE is not optimal.
      
      Dropping dst in validate_xmit_skb() is certainly too late in case
      packet was queued by cpu X but dequeued by cpu Y
      
      The logical point to take care of drop/force is in __dev_queue_xmit()
      before even taking qdisc lock.
      
      As Julian Anastasov pointed out, need for skb_dst() might come from some
      packet schedulers or classifiers.
      
      This patch adds new helper to cleanly express needs of various drivers
      or qdiscs/classifiers.
      
      Drivers that need skb_dst() in their ndo_start_xmit() should call
      following helper in their setup instead of the prior :
      
      	dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
      ->
      	netif_keep_dst(dev);
      
      Instead of using a single bit, we use two bits, one being
      eventually rebuilt in bonding/team drivers.
      
      The other one, is permanent and blocks IFF_XMIT_DST_RELEASE being
      rebuilt in bonding/team. Eventually, we could add something
      smarter later.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Julian Anastasov <ja@ssi.bg>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02875878
  11. 07 10月, 2014 1 次提交
  12. 29 9月, 2014 1 次提交
  13. 14 9月, 2014 2 次提交
  14. 28 4月, 2014 1 次提交
  15. 14 1月, 2014 1 次提交
  16. 19 12月, 2013 2 次提交
  17. 18 12月, 2013 1 次提交
  18. 20 4月, 2013 1 次提交
  19. 15 1月, 2013 1 次提交
  20. 15 8月, 2012 2 次提交
    • E
      userns: Convert cls_flow to work with user namespaces enabled · a6c6796c
      Eric W. Biederman 提交于
      The flow classifier can use uids and gids of the sockets that
      are transmitting packets and do insert those uids and gids
      into the packet classification calcuation.  I don't fully
      understand the details but it appears that we can depend
      on specific uids and gids when making traffic classification
      decisions.
      
      To work with user namespaces enabled map from kuids and kgids
      into uids and gids in the initial user namespace giving raw
      integer values the code can play with and depend on.
      
      To avoid issues of userspace depending on uids and gids in
      packet classifiers installed from other user namespaces
      and getting confused deny all packet classifiers that
      use uids or gids that are not comming from a netlink socket
      in the initial user namespace.
      
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Changli Gao <xiaosuo@gmail.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      a6c6796c
    • E
      net sched: Pass the skb into change so it can access NETLINK_CB · af4c6641
      Eric W. Biederman 提交于
      cls_flow.c plays with uids and gids.  Unless I misread that
      code it is possible for classifiers to depend on the specific uid and
      gid values.  Therefore I need to know the user namespace of the
      netlink socket that is installing the packet classifiers.  Pass
      in the rtnetlink skb so I can access the NETLINK_CB of the passed
      packet.  In particular I want access to sk_user_ns(NETLINK_CB(in_skb).ssk).
      
      Pass in not the user namespace but the incomming rtnetlink skb into
      the the classifier change routines as that is generally the more useful
      parameter.
      
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      af4c6641
  21. 02 4月, 2012 1 次提交
  22. 15 12月, 2011 1 次提交
  23. 29 11月, 2011 1 次提交
  24. 01 11月, 2011 1 次提交
  25. 25 10月, 2011 1 次提交
  26. 06 7月, 2011 1 次提交
  27. 22 6月, 2011 1 次提交
  28. 20 1月, 2011 1 次提交
  29. 14 1月, 2011 1 次提交
    • P
      netfilter: fix Kconfig dependencies · c7066f70
      Patrick McHardy 提交于
      Fix dependencies of netfilter realm match: it depends on NET_CLS_ROUTE,
      which itself depends on NET_SCHED; this dependency is missing from netfilter.
      
      Since matching on realms is also useful without having NET_SCHED enabled and
      the option really only controls whether the tclassid member is included in
      route and dst entries, rename the config option to IP_ROUTE_CLASSID and move
      it outside of traffic scheduling context to get rid of the NET_SCHED dependeny.
      Reported-by: NVladis Kletnieks <Valdis.Kletnieks@vt.edu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      c7066f70
  30. 22 8月, 2010 1 次提交
  31. 20 8月, 2010 1 次提交
  32. 05 8月, 2010 1 次提交
  33. 18 5月, 2010 1 次提交