Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #87649

Bug#1106321: iproute2: "ip monitor" fails with current trixie's linux kernel / iproute2 combination

Path csiph.com!weretis.net!feeder8.news.weretis.net!srl.newsdeef.eu!news.corradoroberto.it!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Yuyang Huang <yuyanghuang@google.com>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#1106321: iproute2: "ip monitor" fails with current trixie's linux kernel / iproute2 combination
Date Fri, 23 May 2025 03:10:02 +0200
Message-ID <KPp58-52TG-3@gated-at.bofh.it> (permalink)
References <KPk5r-4Zw3-1@gated-at.bofh.it> <KPn3j-51qT-1@gated-at.bofh.it> <KPo93-52jJ-3@gated-at.bofh.it> <KPo93-52jJ-1@gated-at.bofh.it> <KPk5r-4Zw3-1@gated-at.bofh.it> <KPo93-52jJ-1@gated-at.bofh.it>
X-Original-To Luca Boccassi <bluca@debian.org>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Fri May 23 01:01:08 2025
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -1.498
Reply-To Yuyang Huang <yuyanghuang@google.com>, 1106321@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian Kernel Team <debian-kernel@lists.debian.org>
X-Debian-Pr-Message followup 1106321
X-Debian-Pr-Package iproute2
X-Debian-Pr-Source iproute2
X-Forwarded-Encrypted i=1; AJvYcCVReOIFhmLT5FflguPP4BggjVbHGgB8A35DAL6Frrb+OcTHhfq9USz0/j0CgZQCo7NmECgU8R4p@bugs.debian.org
X-Gm-Message-State AOJu0YwBP35CdsE1uIrf0BDt+3rS1hF4wmvTZX1nMKCfsCLjCSFJqNhR mEpd+WLQ7bpe+2ZX/ZGefhSJEEoQesuI5WdDD9cPcUWlJbY3mIrOf6545t145efeya4XKLK+ttK k1a7G8CWu3JrA706lubeMB9NpBslap5fiaVGqet4iEow8rZCCnz/enGmG
X-Gm-Gg ASbGncvJUc2pkrr9YfI4LVsW4xAADdo20qXOVibtnr8mhxcceew1JwnDmTkDcMD1Oxq 7qrVWjjb/rbHb0PjmRD7lJONB72ZvgFnRW/+QWTkWpvXWn1dd6ZeWBtSMu8xaB94NaVJ7euO6Bx CP5/bjURF83R9F69jrjf9XzXDynQ67D7SDU2nWiuy5JKGui+6mplotx2UhdLwkhNCRyoISx3WU
X-Google-SMTP-Source AGHT+IFr5ZXM9ujKZGt8xf9qPilPgCd8MVEfGCRwDVYV8nwoK6xw3mPwO0lt31YbuQAP4gVwOh6qGIJQrxAiQLNGHus=
X-Received by 2002:a19:2d0f:0:b0:542:4b92:526d with SMTP id 2adb3069b0e04-55218553808mr804e87.1.1747961926374; Thu, 22 May 2025 17:58:46 -0700 (PDT)
MIME-Version 1.0
X-Gm-Features AX0GCFscXC9XMB5hiL2g5EpdL-FsW-OU9gYZe7SsmvLpbk2gBcssbqf-p5pjHDE
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1906779
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 127
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc David Ahern <dsahern@kernel.org>, Stephen Hemminger <stephen@networkplumber.org>, 1106321@bugs.debian.org, Netdev <netdev@vger.kernel.org>, Maciej Żenczykowski <maze@google.com>
X-Original-Date Fri, 23 May 2025 09:58:08 +0900
X-Original-Message-ID <CADXeF1Hmuc2NoA=Dg1n_3Yi-2kzGNZQdotb4HJpE-0X9K9Qf5Q@mail.gmail.com>
X-Original-References <174794271559.992.2895280719007840700.reportbug@localhost> <CAMw=ZnSsy3t+7uppThVVf2610iCTTSdg+YG5q9FEa=tBn_aLpw@mail.gmail.com> <f6475bd4-cf7e-4b96-8486-8c3d084679fc@kernel.org> <CAMw=ZnT7tcjC6z-9xuMbeC5RhDiaPRHaZB_2i_6WYNJ=cm1QVg@mail.gmail.com> <174794271559.992.2895280719007840700.reportbug@localhost> <CAMw=ZnT7tcjC6z-9xuMbeC5RhDiaPRHaZB_2i_6WYNJ=cm1QVg@mail.gmail.com>
Xref csiph.com linux.debian.bugs.dist:1247526 linux.debian.kernel:87649

Cross-posted to 2 groups.

Show key headers only | View raw


Backward compatibility is broken due to the exit(1) in the following changes.

```
+ if (lmask & IPMON_LMADDR) {
+ if ((!preferred_family || preferred_family == AF_INET) &&
+     rtnl_add_nl_group(&rth, RTNLGRP_IPV4_MCADDR) < 0) {
+ fprintf(stderr,
+ "Failed to add ipv4 mcaddr group to list\n");
+ exit(1);
+ }
+ if ((!preferred_family || preferred_family == AF_INET6) &&
+     rtnl_add_nl_group(&rth, RTNLGRP_IPV6_MCADDR) < 0) {
+ fprintf(stderr,
+ "Failed to add ipv6 mcaddr group to list\n");
+ exit(1);
+ }
+ }
+
+ if (lmask & IPMON_LACADDR) {
+ if ((!preferred_family || preferred_family == AF_INET6) &&
+     rtnl_add_nl_group(&rth, RTNLGRP_IPV6_ACADDR) < 0) {
+ fprintf(stderr,
+ "Failed to add ipv6 acaddr group to list\n");
+ exit(1);
+ }
+ }
+
```

My patches follow the existing code styles, so I also added exit(1).

Link: https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/tree/ip/ipmonitor.c#n330

I thought iproute2 was intentionally not backward compatible, but it
sounds like that's not true.

I can submit a fix patch to remove the exit(1), which should fix the
backward compatibility issue.

Shall we proceed with this proposal?

Thanks,

Yuyang

On Fri, May 23, 2025 at 9:03 AM Luca Boccassi <bluca@debian.org> wrote:
>
> On Fri, 23 May 2025 at 01:00, David Ahern <dsahern@kernel.org> wrote:
> >
> > On 5/22/25 4:55 PM, Luca Boccassi wrote:
> > > On Thu, 22 May 2025 at 20:41, Adel Belhouane <bugs.a.b@free.fr> wrote:
> > >>
> > >> Package: iproute2
> > >> Version: 6.14.0-3
> > >> Severity: normal
> > >> X-Debbugs-Cc: bugs.a.b@free.fr
> > >>
> > >> Dear Maintainer,
> > >>
> > >> Having iproute2 >= 6.14 while running a linux kernel < 6.14
> > >> triggers this bug (tested using debian-13-nocloud-amd64-daily-20250520-2118.qcow2)
> > >>
> > >>     root@localhost:~# ip monitor
> > >>     Failed to add ipv4 mcaddr group to list
> > >>
> > >> More specifically this subcommand, which didn't exist in iproute2 6.13
> > >> is affected:
> > >>
> > >>     root@localhost:~# ip mon maddr
> > >>     Failed to add ipv4 mcaddr group to list
> > >>     root@localhost:~# ip -6 mon maddr
> > >>     Failed to add ipv6 mcaddr group to list
> > >>
> > >> causing the generic "ip monitor" command to fail.
> > >>
> > >> As trixie will use a 6.12.x kernel, trixie is affected.
> > >>
> > >> bookworm's iproute2/bookworm-backports is also affected since currently
> > >> bookworm's backport kernel is also 6.12.x
> > >>
> > >> Workarounds:
> > >> * upgrade the kernel to experimental's (currently) 6.14.6-1~exp1
> > >> * downgrade iproute2 to 6.13.0-1 (using snapshot.d.o)
> > >> * on bookworm downgrade (using snapshot.d.o)
> > >>   iproute2 backport to 6.13.0-1~bpo12+1
> > >>
> > >> Details I could gather:
> > >>
> > >> This appears to come from this iproute2 6.14's commit:
> > >>
> > >> https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?h=v6.14.0&id=7240e0e40f8332dd9f11348700c0c96b8df4ca5b
> > >>
> > >> which appears to depend on new kernel 6.14 rtnetlink features as described
> > >> in Kernelnewbies ( https://kernelnewbies.org/Linux_6.14#Networking ):
> > >>
> > >> Add ipv6 anycast join/leave notifications
> > >>
> > >> with this (kernel 6.14) commit:
> > >>
> > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=33d97a07b3ae6fa713919de4e1864ca04fff8f80
> > >
> > > Hi Stephen and David,
> > >
> > > It looks like there's a regression in iproute2 6.14, and 'ip monitor'
> > > no longer works with kernels < 6.14. Could you please have a look when
> > > you have a moment? Thanks!
> >
> > were not a lot of changes, so most likely the multiaddress or anycast
> > address changes from Yuyang Huang. Please take a look.
>
> The original reporter suggested it was this commit that introduced the
> regression:
>
> https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?h=v6.14.0&id=7240e0e40f8332dd9f11348700c0c96b8df4ca5b

Back to linux.debian.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1106321: iproute2: "ip monitor" fails with current trixie's linux kernel / iproute2 combination Adel Belhouane <bugs.a.b@free.fr> - 2025-05-22 21:50 +0200
  Bug#1106321: iproute2: "ip monitor" fails with current trixie's linux kernel / iproute2 combination Luca Boccassi <bluca@debian.org> - 2025-05-23 01:00 +0200
    Bug#1106321: iproute2: "ip monitor" fails with current trixie's linux kernel / iproute2 combination David Ahern <dsahern@kernel.org> - 2025-05-23 02:20 +0200
  Bug#1106321: iproute2: "ip monitor" fails with current trixie's linux kernel / iproute2 combination Luca Boccassi <bluca@debian.org> - 2025-05-23 02:10 +0200
    Bug#1106321: iproute2: "ip monitor" fails with current trixie's linux kernel / iproute2 combination Yuyang Huang <yuyanghuang@google.com> - 2025-05-23 03:10 +0200
  Bug#1106321: iproute2: "ip monitor" fails with current trixie's linux kernel / iproute2 combination Yuyang Huang <yuyanghuang@google.com> - 2025-05-23 03:20 +0200
    Bug#1106321: iproute2: "ip monitor" fails with current trixie's linux kernel / iproute2 combination David Ahern <dsahern@kernel.org> - 2025-05-23 04:30 +0200
  Bug#1106321: marked as done (iproute2: "ip monitor" fails with  current trixie's linux kernel / iproute2 combination) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-05-27 02:10 +0200

csiph-web