MLD-5.x > Development
patches for vdr-plugin-mcli
fishfingers:
There is also a problem in the mcli/mcast code with the lenght of the network interface
name which is limited to 8 chars via a sscanf format/field lenght (%8s) , it really should be
IFNAMSIZ which is currently 16. I can't see how to redefine value to get the %s field
width right, so just remove the limit, changing %8s to %s. The /proc/net/if_inet6 file that is
used as input should never have a longer value anyway.
--- Code: ---diff --git a/src/50_mcli_longer_interface_name.patch b/src/50_mcli_longer_interface_name.patch
new file mode 100644
index 0000000..1d0115e
--- /dev/null
+++ b/src/50_mcli_longer_interface_name.patch
@@ -0,0 +1,11 @@
+--- mcli/mcast/common/interfaces.c.orig 2019-08-01 19:54:14.985462141 +0000
++++ mcli/mcast/common/interfaces.c 2019-08-01 19:54:50.405244618 +0000
+@@ -81,7 +81,7 @@
+ char buf[255];
+ /* Format "fe80000000000000029027fffe24bbab 02 0a 20 80 eth0" */
+ while (fgets (buf, sizeof (buf), file)) {
+- if (21 != sscanf (buf, "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx %x %x %x %x %8s", &addr.s6_addr[0], &addr.s6_addr[1], &addr.s6_addr[2], &addr.s6_addr[3], &addr.s6_addr[4], &addr.s6_addr[5], &addr.s6_addr[6], &addr.s6_addr[7], &addr.s6_addr[8], &addr.s6_addr[9], &addr.s6_addr[10], &addr.s6_addr[11], &addr.s6_addr[12], &addr.s6_addr[13], &addr.s6_addr[14], &addr.s6_addr[15], &ifindex, &prefixlen, &scope, &flags, devname)) {
++ if (21 != sscanf (buf, "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx %x %x %x %x %s", &addr.s6_addr[0], &addr.s6_addr[1], &addr.s6_addr[2], &addr.s6_addr[3], &addr.s6_addr[4], &addr.s6_addr[5], &addr.s6_addr[6], &addr.s6_addr[7], &addr.s6_addr[8], &addr.s6_addr[9], &addr.s6_addr[10], &addr.s6_addr[11], &addr.s6_addr[12], &addr.s6_addr[13], &addr.s6_addr[14], &addr.s6_addr[15], &ifindex, &prefixlen, &scope, &flags, devname)) {
+
+ warn ("/proc/net/if_inet6 in wrong format!\n");
+ continue;
--- End code ---
fishfingers:
Another small change, this time to deliver the tools built as part of the
mcli/mcast tree and not just the vdr plugin and library.
--- Code: ---diff --git a/Makefile b/Makefile
index 491e8e0..55bcc7e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,4 +7,9 @@ all: ../vdr $(package).$(suffix)
clean: plugin_clean
-$(data): $(plugin)
+$(data): $(plugin) $(data_tree)
+ mkdir -p $@/usr/sbin
+ cp -up src/mcli/mcast/client/mcli $@/usr/sbin/mcli
+ cp -up src/mcli/mcast/tool/netcvdiag $@/usr/sbin/netcvdiag
+ cp -up src/mcli/mcast/tool/netcvlogview $@/usr/sbin/netcvlogview
+ cp -up src/mcli/mcast/tool/netcvupdate $@/usr/sbin/netcvupdate
--- End code ---
I have still not looked at the channel switching problem mentioned in the original post ::)
Navigation
[0] Message Index
[*] Previous page
Go to full version