Skip to content
  • Andrey Vagin's avatar
    61b8fc26
    net: block all traffic in internal network (v4) · 61b8fc26
    Andrey Vagin authored
    Let's imagine that we have two local interconnected sockets.
    Whe we are restoring tcp sockets, we need to disable the repair mode
    to restore data in sending queues.
    
    If traffic isn't blocked, a socket starts operating, but
    in this time another end can be not restored yet.
    
    $ test/zdtm.sh -r ns/static/socket-tcpbuf-local
    ...
    (00.274632) 5: Error (sk-tcp.c:485): Can't restore 2 queue data (-1), want (1780919:1780919): Connection reset by peer
    
    We create a separate chain to avoid conflicts with other rules.
    
    https://bugs.openvz.org/browse/CRIU-96
    
    
    
    v2: use iptables-restore to apply whole configuration for one call
    v3: add a comment why we use iptables-restore instread of iptables.
    v4: remove unused headers
    Signed-off-by: default avatarAndrew Vagin <avagin@virtuozzo.com>
    Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
    61b8fc26
    net: block all traffic in internal network (v4)
    Andrey Vagin authored
    Let's imagine that we have two local interconnected sockets.
    Whe we are restoring tcp sockets, we need to disable the repair mode
    to restore data in sending queues.
    
    If traffic isn't blocked, a socket starts operating, but
    in this time another end can be not restored yet.
    
    $ test/zdtm.sh -r ns/static/socket-tcpbuf-local
    ...
    (00.274632) 5: Error (sk-tcp.c:485): Can't restore 2 queue data (-1), want (1780919:1780919): Connection reset by peer
    
    We create a separate chain to avoid conflicts with other rules.
    
    https://bugs.openvz.org/browse/CRIU-96
    
    
    
    v2: use iptables-restore to apply whole configuration for one call
    v3: add a comment why we use iptables-restore instread of iptables.
    v4: remove unused headers
    Signed-off-by: default avatarAndrew Vagin <avagin@virtuozzo.com>
    Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
Loading