public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 0/8] ndp: Unsolicited RAs
@ 2024-11-14  3:33 David Gibson
  2024-11-14  3:33 ` [PATCH v2 1/8] ndp: Remove redundant update to addr_seen David Gibson
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: David Gibson @ 2024-11-14  3:33 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +Cc: David Gibson

The default route a guest obtains via NDP has an expiry.  We set this
to the maximum allowed, 65535s (about 18 hours).  We missed, however,
that after that expiry, the guest won't send a new Router
Solicitation.  Instead it expects an unsolicited Router Advertisement
to have come at some point before the expiry.  This means that on an
IPv6 setup, the default will disappear after 18 hours.

Correct this by sending unsolicited Router Advertisements as required
by RFC 4861.  Along the way we make a number of small cleanups to the
NDP code.

Link: https://github.com/kubevirt/kubevirt/issues/13191

v2:
 * Some minor stylistic fixes
 * Use srandom()
 * Better explanation of the random requirements for the RAs

David Gibson (8):
  ndp: Remove redundant update to addr_seen
  ndp: Add ndp_send() helper
  ndp: Split out helpers for sending specific NDP message types
  ndp: Use struct assignment in preference to memcpy() for IPv6
    addresses
  ndp: Make route lifetime a #define
  util: Add general low-level random bytes helper
  passt: Seed libc's pseudo random number generator
  ndp: Send unsolicited Router Advertisements

 ip.h    |   9 +++
 ndp.c   | 219 +++++++++++++++++++++++++++++++++++++-------------------
 ndp.h   |   7 +-
 passt.c |  42 ++++-------
 util.c  |  54 ++++++++++++++
 util.h  |   2 +
 6 files changed, 228 insertions(+), 105 deletions(-)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-11-14 18:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-14  3:33 [PATCH v2 0/8] ndp: Unsolicited RAs David Gibson
2024-11-14  3:33 ` [PATCH v2 1/8] ndp: Remove redundant update to addr_seen David Gibson
2024-11-14  3:33 ` [PATCH v2 2/8] ndp: Add ndp_send() helper David Gibson
2024-11-14  3:33 ` [PATCH v2 3/8] ndp: Split out helpers for sending specific NDP message types David Gibson
2024-11-14  3:33 ` [PATCH v2 4/8] ndp: Use struct assignment in preference to memcpy() for IPv6 addresses David Gibson
2024-11-14  3:33 ` [PATCH v2 5/8] ndp: Make route lifetime a #define David Gibson
2024-11-14  3:33 ` [PATCH v2 6/8] util: Add general low-level random bytes helper David Gibson
2024-11-14  3:33 ` [PATCH v2 7/8] passt: Seed libc's pseudo random number generator David Gibson
2024-11-14  3:33 ` [PATCH v2 8/8] ndp: Send unsolicited Router Advertisements David Gibson
2024-11-14 18:18 ` [PATCH v2 0/8] ndp: Unsolicited RAs Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).