public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH] ndp: Don't send unsolicited RAs if NDP is disabled
Date: Tue, 19 Nov 2024 12:21:56 +1100	[thread overview]
Message-ID: <20241119012156.1827870-1-david@gibson.dropbear.id.au> (raw)

We recently added support for sending unsolicited NDP Router Advertisement
packets.  While we (correctly) disable this if the --no-ra option is given
we incorrectly still send them if --no-ndp is set.  Fix the oversight.

Fixes: 6e1e44293ef9 ("ndp: Send unsolicited Router Advertisements")

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 passt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/passt.c b/passt.c
index a51a4e1..06e0a33 100644
--- a/passt.c
+++ b/passt.c
@@ -109,7 +109,8 @@ static void post_handler(struct ctx *c, const struct timespec *now)
 	flow_defer_handler(c, now);
 #undef CALL_PROTO_HANDLER
 
-	ndp_timer(c, now);
+	if (!c->no_ndp)
+		ndp_timer(c, now);
 }
 
 /**
-- 
@@ -109,7 +109,8 @@ static void post_handler(struct ctx *c, const struct timespec *now)
 	flow_defer_handler(c, now);
 #undef CALL_PROTO_HANDLER
 
-	ndp_timer(c, now);
+	if (!c->no_ndp)
+		ndp_timer(c, now);
 }
 
 /**
-- 
2.47.0


             reply	other threads:[~2024-11-19  1:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19  1:21 David Gibson [this message]
2024-11-19 20:43 ` [PATCH] ndp: Don't send unsolicited RAs if NDP is disabled Stefano Brivio

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=20241119012156.1827870-1-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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.
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).