modprobe: cannot parse modules.dep error
Hi all,
I am running into the following problem when invoking a netfilter iptables ( v1.3.8) and xtables support in the buildroot's busybox (v1.7.2) system. The netfilter packet configuration and support modules are compiled and built into the linux-2.6.16 kernel image.
When a 'C++' application code calls the iptables through sprintf(buff, "%s -t mangle -A PREROUTING %s -j MARK --set-mark 512", Config.iptables, Config.link[i]);
it throws the modprobe error.
iptables -t mangle -A PREROUTING -d 88.160.215.156 -p icmp -j MARK --set-mark 512
modprobe: cannot parse modules.dep
modprobe: cannot parse modules.dep
iptables -t mangle -A PREROUTING -s 88.160.215.156 -p icmp -j MARK --set-mark 512
modprobe: cannot parse modules.dep
modprobe: cannot parse modules.dep
iptables -t mangle -A PREROUTING -d 88.160.215.156 -p tcp --dport http -j MARK --set-mark 512
modprobe: cannot parse modules.dep
modprobe: cannot parse modules.dep
Normally it shouldn't do module probing as all the netfilter support symbols are included in the kernel image. Can anybody tell me why the system throws the modprobe error though the netfilters supports are built into the kernel image.?
Thanks
Sara
Osmozis
Quoted 12 lines · Saravanan Chanemouganandam
Hi all,
I am running into the following problem when invoking a netfilter iptables ( v1.3.8) and xtables support in the buildroot's busybox (v1.7.2) system. The netfilter packet configuration and support modules are compiled and built into the linux-2.6.16 kernel image.
When a 'C++' application code calls the iptables through
sprintf(buff, "%s -t mangle -A PREROUTING %s -j MARK --set-mark 512", Config.iptables, Config.link[i]);
it throws the modprobe error.
Quoted 11 lines
iptables -t mangle -A PREROUTING -d 88.160.215.156 -p icmp -j MARK --set-mark 512
modprobe: cannot parse modules.dep
modprobe: cannot parse modules.dep
iptables -t mangle -A PREROUTING -s 88.160.215.156 -p icmp -j MARK --set-mark 512
modprobe: cannot parse modules.dep
modprobe: cannot parse modules.dep
iptables -t mangle -A PREROUTING -d 88.160.215.156 -p tcp --dport http -j MARK --set-mark 512
modprobe: cannot parse modules.dep
Can you try the following in modprobe.c?
static struct dep_t *build_dep(void)
{
...
filename = xasprintf("/lib/modules/%s/modules.dep", un.release);
fd = open(filename, O_RDONLY);
if (ENABLE_FEATURE_CLEAN_UP)
free(filename);
if (fd < 0) {
/* Ok, that didn't work. Fall back to looking in /lib/modules */
fd = open("/lib/modules/modules.dep", O_RDONLY);
if (fd < 0) {
- bb_error_msg_and_die("cannot parse modules.dep");
+ bb_error_msg("cannot parse modules.dep");
+ return NULL;
}
}...
--
vda