From 66e26b95e4886f35301829c3ed2af458796b312f Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 27 Mar 2026 15:34:23 +1100 Subject: conf: Don't bother complaining about overlapping excluded ranges In conf_ports() we die with an error if a port specification includes overlapping excluded ranges. This is contrary to our usual convention of handling conflicting options (last option wins, rather than error). Plus, these options don't even conflict, they're just redundant. This behaviour potentially makes life harder for scripts or other tools invoking pasta - if they might have the same port excluded for multiple different reasons, they have to explicitly deduplicate the list, rather than just list everything on the command line. So, don't give this error, let a port be excluded as many times as you like. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- conf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/conf.c b/conf.c index 7a3085b..e5baf8e 100644 --- a/conf.c +++ b/conf.c @@ -355,12 +355,8 @@ static void conf_ports(const struct ctx *c, char optname, const char *optarg, if ((*p != '\0') && (*p != ',')) /* Garbage after the range */ goto bad; - for (i = xrange.first; i <= xrange.last; i++) { - if (bitmap_isset(exclude, i)) - die("Overlapping excluded ranges %s", optarg); - + for (i = xrange.first; i <= xrange.last; i++) bitmap_set(exclude, i); - } } while ((p = next_chunk(p, ','))); if (ifname && c->no_bindtodevice) { -- cgit v1.2.3