Skip to content
  • Cyrill Gorcunov's avatar
    net: ppp_generic - fix regressions caused by IDR conversion · 85997576
    Cyrill Gorcunov authored
    The commits:
    
    	7a95d267
    	("net: ppp_generic - use idr technique instead of cardmaps")
    
    	ab5024ab
    
    
    	("net: ppp_generic - use DEFINE_IDR for static initialization")
    
    introduced usage of IDR functionality but broke userspace side.
    
    Before this commits it was possible to allocate new ppp interface with
    specified number. Now it fails with EINVAL.  Fix it by trying to
    allocate interface with specified unit number and return EEXIST if
    fail which allow pppd to ask us to allocate new unit number.
    
    And fix messages on memory allocation fails - add details that it's
    PPP module who is complaining.
    
    Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    85997576