Hello,
today I successfully upgraded my Archer C7 v2 to newest OpenWRT firmware 18.06.0.
The package "cshark" is not yet available but "luci-app-cshark" is still there...
Is "cshark" coming back?
Uwe
Hello,
today I successfully upgraded my Archer C7 v2 to newest OpenWRT firmware 18.06.0.
The package "cshark" is not yet available but "luci-app-cshark" is still there...
Is "cshark" coming back?
Uwe
Probably, once somebody fixes it:
http://downloads.lede-project.org/snapshots/faillogs/mips_24kc/packages/cshark/
[ 20%] Building C object CMakeFiles/cshark.dir/src/uclient.c.o
/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/build_dir/target-mips_24kc_musl/cshark-2015-11-24-e575ab3d35d75a6f70488001fcba45690ebe9b3e/src/uclient.c: In function 'cshark_uclient_init':
/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/build_dir/target-mips_24kc_musl/cshark-2015-11-24-e575ab3d35d75a6f70488001fcba45690ebe9b3e/src/uclient.c:170:50: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1007 [-Werror=format-truncation=]
snprintf(extra_tags, BUFSIZ, "?additional_tags=%s", config.tags);
^~ ~~~~~~
/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/build_dir/target-mips_24kc_musl/cshark-2015-11-24-e575ab3d35d75a6f70488001fcba45690ebe9b3e/src/uclient.c:170:3: note: 'snprintf' output between 18 and 1041 bytes into a destination of size 1024
snprintf(extra_tags, BUFSIZ, "?additional_tags=%s", config.tags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
CMakeFiles/cshark.dir/build.make:88: recipe for target 'CMakeFiles/cshark.dir/src/uclient.c.o' failed
make[6]: *** [CMakeFiles/cshark.dir/src/uclient.c.o] Error 1
make[6]: Leaving directory '/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/build_dir/target-mips_24kc_musl/cshark-2015-11-24-e575ab3d35d75a6f70488001fcba45690ebe9b3e'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cshark.dir/all' failed
make[5]: *** [CMakeFiles/cshark.dir/all] Error 2
Feel free to do that, test your fix and then submit a pull request of the fix.
Hello,
snprintf(extra_tags, BUFSIZ-18, "?additional_tags=%s", config.tags);
should work.
Uwe
Edit:
After installing the whole build system, i could test the patch - and it doesnt work
The correct patch is:
@@ -161,13 +161,13 @@ int cshark_uclient_init(struct cshark *cs)
char capture_length_str[32];
char buf[BUFSIZ];
char url[BUFSIZ];
char extra_tags[BUFSIZ+20];
FILE *fd = NULL;
int rc = -1;
if (strcmp(config.tags,"") != 0 ) {
/* include the additional tags parameter */
snprintf(extra_tags, BUFSIZ+20, "?additional_tags=%s", config.tags);
} else {
/* no additional tags specified */
Great.
Then please continue with the remaining part of my advice:
"test your fix and then submit a pull request of the fix."
Openwrt is a community effort and packages are fixed/maintained by users interested in those specific packages. Likely that fix needs to be done as a patch to the upstream sources, or possibly upstream already has a newer source version that contains that fix (that is likely caused by new gcc versions).
Openwrt makefile is in https://github.com/openwrt/packages/tree/master/net/cshark
Hello,
I created an issue and a pull request on git repo for cshark.
Uwe
should be
snprintf(extra_tags, BUFSIZ+18, "?additional_tags=%s", config.tags);
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.