Skip to contentSkip to conversation

nfct: helper: Extend error message for EBUSY

PATCH In review Phil Sutter 1 participant 2 messages Aug 28, 2025 – Sep 9, 2025 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH v2 1/1 nfct: helper: Extend error message for EBUSY

Users may be not aware the user space helpers conflict with kernel space ones, so add a hint about the possible cause of the EBUSY code returned by the kernel.

---
Changes since v1:
- React upon EBUSY instead of EEXIST to cover for recent kernel changes.

---
 src/nfct-extensions/helper.c | 3 +++
 1 file changed, 3 insertions(+)
src/nfct-extensions/helper.c +3 -0
index 894bf269ad2bb..3d32703d13903 100644
@@ -229,6 +229,9 @@ static int nfct_cmd_helper_add(struct mnl_socket *nl, int argc, char *argv[])
 	portid = mnl_socket_get_portid(nl);
 	if (nfct_mnl_talk(nl, nlh, seq, portid, NULL, NULL) < 0) {
 		nfct_perror("netlink error");
+		if (errno == EBUSY)
+			fprintf(stderr,
+				"Maybe unload nf_conntrack_%s.ko first?\n", argv[3]);
 		return -1;
 	}
 
Signature · 1 line
2.51.0