Skip to contentSkip to conversation

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

DISCUSSION Luca Boccassi 3 participants 8 messages May 22, 2025 – May 23, 2025 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 41 lines · Adel Belhouane

Package: iproute2
Version: 6.14.0-3
Severity: normal
X-Debbugs-Cc: [email protected]

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

Quoted 8 lines

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!

#2 lore raw
Quoted 49 lines · Luca Boccassi
Quoted 48 lines · Adel Belhouane

Package: iproute2
Version: 6.14.0-3
Severity: normal
X-Debbugs-Cc: [email protected]

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:

Quoted 7 lines
Quoted 1 line

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.

#3 lore raw
Quoted 53 lines · David Ahern
Quoted 51 lines · Luca Boccassi
Quoted 49 lines · Adel Belhouane

Package: iproute2
Version: 6.14.0-3
Severity: normal
X-Debbugs-Cc: [email protected]

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

Quoted 8 lines
Quoted 5 lines

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

#4 lore 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).

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

Quoted 68 lines · Luca Boccassi
Quoted 53 lines · David Ahern
Quoted 51 lines · Luca Boccassi
Quoted 49 lines · Adel Belhouane

Package: iproute2
Version: 6.14.0-3
Severity: normal
X-Debbugs-Cc: [email protected]

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

Quoted 8 lines
Quoted 5 lines

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

#5 lore raw
Quoted 34 lines · Yuyang Huang

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

```
+ if (lmask & IPMON_LMADDR) {
+ if ((!preferred_family || preferred_family == AF_INET) &&

(quoted diff) +22 -0
+     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).

Quoted 7 lines

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?

iproute2 is generally backward compatible with previous kernels yes, so it would be great to have a fix for this. Thanks!

#6 lore raw
Quoted 1 line

iproute2 is generally backward compatible with previous kernels yes,

Acked, will submit a patch ASAP.
Could you advise which branch needs the fix? Is submitting to iproute2-next and iproute2 enough?

Thanks,

Yuyang

Quoted 46 lines · Luca Boccassi
Quoted 34 lines · Yuyang Huang

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

```
+ if (lmask & IPMON_LMADDR) {
+ if ((!preferred_family || preferred_family == AF_INET) &&

(quoted diff) +22 -0
+     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).

Quoted 7 lines

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?

iproute2 is generally backward compatible with previous kernels yes, so it would be great to have a fix for this. Thanks!

#7 lore raw
Quoted 7 lines · Yuyang Huang
Quoted 1 line

iproute2 is generally backward compatible with previous kernels yes,

Acked, will submit a patch ASAP.
Could you advise which branch needs the fix? Is submitting to iproute2-next and iproute2 enough?

Thank you for the quick response.

I should have caught the exit on lack of support for the feature, so that is on me.

Please send a patch based on iproute2 main (though main and next are practically the same right now).

#8 lore raw

Acked, will submit a patch to iproute2 main by EOD.

Thanks,

Yuyang

Quoted 18 lines · David Ahern
Quoted 7 lines · Yuyang Huang
Quoted 1 line

iproute2 is generally backward compatible with previous kernels yes,

Acked, will submit a patch ASAP.
Could you advise which branch needs the fix? Is submitting to iproute2-next and iproute2 enough?

Thank you for the quick response.

I should have caught the exit on lack of support for the feature, so that is on me.

Please send a patch based on iproute2 main (though main and next are practically the same right now).