• J
    tuntap: limit the number of flow caches · b8732fb7
    Jason Wang 提交于
    We create new flow caches when a new flow is identified by tuntap, This may lead
    some issues:
    
    - userspace may produce a huge amount of short live flows to exhaust host memory
    - the unlimited number of flow caches may produce a long list which increase the
      time in the linear searching
    
    Solve this by introducing a limit of total number of flow caches.
    
    Cc: Stephen Hemminger <stephen@networkplumber.org>
    Signed-off-by: NJason Wang <jasowang@redhat.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    b8732fb7
tun.c 53.5 KB