• Andrea Mayer's avatar
    vrf: add sysctl parameter for strict mode · 33306f1a
    Andrea Mayer authored
    Add net.vrf.strict_mode sysctl parameter.
    
    When net.vrf.strict_mode=0 (default) it is possible to associate multiple
    VRF devices to the same table. Conversely, when net.vrf.strict_mode=1 a
    table can be associated to a single VRF device.
    
    When switching from net.vrf.strict_mode=0 to net.vrf.strict_mode=1, a check
    is performed to verify that all tables have at most one VRF associated,
    otherwise the switch is not allowed.
    
    The net.vrf.strict_mode parameter is per network namespace.
    Signed-off-by: default avatarAndrea Mayer <andrea.mayer@uniroma2.it>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    33306f1a
vrf.c 42.3 KB