netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Yourtchenko <ayourtch@gmail.com>
To: netdev@vger.kernel.org
Cc: Andrew Yourtchenko <ayourtch@gmail.com>
Subject: [PATCH 0/2] ipv6: fix stuck RA-derived route in container after migration with criu
Date: Tue, 16 Aug 2016 15:59:01 +0200	[thread overview]
Message-ID: <1471355943-21288-1-git-send-email-ayourtch@gmail.com> (raw)

This patchset fixes the connectivity problem for containers
with RA-derived default route, after they were migrated using criu:
the default routes would lose their "expires" value and become
stuck forever. The corresponding criu issue with the discussion
is at https://github.com/xemul/criu/issues/177

The latter uses "ip -6 route save" to save the routes during
the migration, and "ip -6 route restore" during restore, so the problem
is easily reproducible even without criu.

There are two problems, hence two patches in this patchset:

1) the expiry time for the route is saved in 
RTA_CACHEINFO via rtnl_put_cacheinfo, but the code in rtm_to_fib6_config
expects the RTA_EXPIRES. Rather than cherrypicking in the restore code path
from RTA_CACHEINFO, adding RTA_EXPIRES upon save seemed like
a better option.

2) the restored route, even with the properly restored expires,
does not have the correct RTF_* flags set (RTF_ADDRCONF|RTF_DEFAULT),
preventing the incoming router advertisements from updating it.
During the code review I noticed RTF_ROUTEINFO would be also lost
during save/restore. This can be viewed as an operation symmetric
to that done in f0396f60d7c165018c9b203fb9b89fb224835578.

Tested both net and net-next with the patches.

Andrew Yourtchenko (2):
  ipv6: save route expiry in RTA_EXPIRES if RTF_EXPIRES set
  ipv6: fixup RTF_* flags when restoring RTPROT_RA route from rtnetlink

 net/ipv6/route.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

-- 
2.7.4

             reply	other threads:[~2016-08-16 13:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16 13:59 Andrew Yourtchenko [this message]
2016-08-16 13:59 ` [PATCH 1/2] ipv6: save route expiry in RTA_EXPIRES if RTF_EXPIRES set Andrew Yourtchenko
2016-08-16 13:59 ` [PATCH 2/2] ipv6: fixup RTF_* flags when restoring RTPROT_RA route from rtnetlink Andrew Yourtchenko
2016-08-19  4:09 ` [PATCH 0/2] ipv6: fix stuck RA-derived route in container after migration with criu David Miller
2016-08-19 16:41 ` [PATCH v2 " Andrew Yourtchenko
2016-08-19 16:41   ` [PATCH v2 1/2] ipv6: save route expiry in RTA_EXPIRES if RTF_EXPIRES set Andrew Yourtchenko
2016-08-19 20:26     ` Eric Dumazet
2016-08-22 11:41       ` Andrew Yourtchenko
2016-08-19 16:41   ` [PATCH v2 2/2] ipv6: fixup RTF_* flags when restoring RTPROT_RA route from rtnetlink Andrew Yourtchenko
2016-08-19 18:07     ` Sergei Shtylyov
2016-08-22 11:04       ` Andrew Yourtchenko
2016-08-22 11:06         ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471355943-21288-1-git-send-email-ayourtch@gmail.com \
    --to=ayourtch@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).