Re: x86/64 SDK segfaults on some hosts [Was: Re: [PATCH 1/2] fakeroot: make fakeroot script relocatable]

2020-11-09 Thread Jo-Philipp Wich
Hi,

> it seems like mixing dynamic loader from the host and libraries from SDK
> doesn't work reliably in all cases and may result in crash.

Yes, that is why we wrap the SDK executables to forcibly invoke them
through the bundled loader.

Attempting to use SDK executables or librries with the host system LDSO
will result in undefined behavior.

I probably missed the point of your mail - do you meant to imply that my
patch introduced this regression?

~ Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] rpcd: Add support for plugin command input via argv[3] ($3)

2020-11-11 Thread Jo-Philipp Wich
Hi,

the request payload can theoretically become very big, something in the
few hundred kilobyte to one megabyte ballpark. I am not sure if it is a
good idea to pass that via the argv vector.

~ Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Upcoming 19.07.4 and 18.07.9 stable releases

2020-11-14 Thread Jo-Philipp Wich
Hi,

> Are there any real blockers left?

LuCI support for bridge-vlan config is unmerged/unpolished yet.

I'd rather not ship 20.x without functioning switch config support in
the ui.

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v4] build: create $(PKG_SYMVERS_DIR) if non-existent

2020-11-19 Thread Jo-Philipp Wich
Hi Sebastian,

thanks for following up with a v4. I merged this change in
https://git.openwrt.org/2127accd441b1c979c8f3f56f3ad5264542e185a now.

~ Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Download server downtime

2020-11-24 Thread Jo-Philipp Wich
Hi,

yesterday, on Monday the 23rd around 20:00 UTC, the primary download
server downloads.openwrt.org (mirror-02.infra.openwrt.org) experienced
total connectivity loss which lasted until approx. Tuesday, 24th 11:00 UTC.

The reason for the downtime was, according to our hosting provider, a
hardware failure of the machine serving the download repositories.

The server has been replaced now and is back on-line. Additionally we're
still in the process of acquiring CDN coverage to avoid such situations
in the future (thanks, Paul).

Until then, I'd like to use the opportunity to point to our mirrors [1]
which you can use to download OpenWrt binaries in case the main download
server is unavailable.


Please excuse the inconvenience and troubles caused.


Kind regards,
Jo-Philipp Wich


1: https://openwrt.org/downloads#mirrors

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] openvpn: update to 2.5.0

2020-11-30 Thread Jo-Philipp Wich
Hi,

[...]
> @@ -137,6 +143,7 @@ allow_recursive_routing
>  auth_nocache
>  auth_user_pass_optional
>  bind
> +block-ipv6

I suppose this needs to be `block_ipv6` ?

>  ccd_exclusive
>  client
>  client_to_client
> @@ -185,10 +192,13 @@ tls_server
>  up_delay
>  up_restart
>  username_as_common_name
> +vlan_tagging

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] netifd: add segment routing support

2020-12-02 Thread Jo-Philipp Wich
Hi,

the chosen option name does not really fit other existing bool options which
do not use an enable(d) or disable(d) prefix/suffix.

I'd call the new option simply `seg6` or even better `ip6segmentrouting` to
fall in line with other IPv6 specific options [1]

~ Jo

1: https://lxr.openwrt.org/source/netifd/interface.c#L70



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] ltq-dsl-base: only lock the dsl pipe once for all stats

2020-12-04 Thread Jo-Philipp Wich
Hi,

is there any reason not to use the flock style below? It should be more
reliable wrt. unlocking if the script is prematurely terminated.

-- 8< --
  {
  flock -x 1000

  command
  command
  command
  ...
  } 1000>/var/lock/dsl_pipe
-- >8 --


See also the fourth example at
https://man7.org/linux/man-pages/man1/flock.1.html#EXAMPLES

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Lightweight policy-based routing

2020-12-04 Thread Jo-Philipp Wich
Hi Philip,

ip rules are possible in uci, but not sure if all the bits you require are
covered:

https://openwrt.org/docs/guide-user/network/ucicheatsheet#ip_rules_for_both_rule_and_rule6

`config route` sections allow specifying `option table` as well to stage the
routes in the non-main rttable.

Since the device options for uci rules and routes require logical networks and
not Linux network device names, you might need to declare a dummy interface
for xfrm0, like this:

config interface vpn
  option proto static
  option ifname xfrm0

It might be that netifd will clear out any IP addresses on the xfrm0
interface, so you would need to encode those in uci as well:

config interface vpn
  option proto static
  option ifname xfrm0
  option ipaddr 192.168.1.0/24
  option table 200   # will instruct netifd to put any related routes into
table 200


Netifd understands aliases set up in /etc/iproute2/rt_tables but there is no
uci way to declare new symbolic aliases. So either you need to manage that
file externally or you stick to numeric table IDs.

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Merged: ipsets: allow blank/commented lines withloadfile

2020-12-06 Thread Jo-Philipp Wich
Merged into project/firewall3.git, branch master at
http://git.openwrt.org/?p=project/firewall3.git.

Thank you!


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Merged: firewall3: fix duplicate defaults section detection

2020-12-06 Thread Jo-Philipp Wich
Merged into project/firewall3.git, branch master at
http://git.openwrt.org/?p=project/firewall3.git.

Thank you!


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [luci PATCH 05/13] luci-mod-status: use the new ubus dsl metrics

2020-12-11 Thread Jo-Philipp Wich
Hi,

> This is significantly faster.

great work! I like it :)

Minor nitpick below.



> [...] 
> -var callLuciDSLStatus = rpc.declare({
> - object: 'luci-rpc',
> - method: 'getDSLStatus',
> +var call_dsl_metrics = rpc.declare({
> + object: 'dsl',
> + method: 'metrics',
>   expect: { '': {} }
>  });

Please keep the camel case notation to align with the other RPC method
declarations in the tree, so `s/call_dsl_metrics/callDSLMetrics/g`


~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] uhttpd: don't redirect to HTTPS by default

2020-12-14 Thread Jo-Philipp Wich
Hi,

> So we can ship px5g-wolfssl by default in the release image, but still
> make the HTTPS for LuCI optional. This small change with addition of
> `CONFIG_PACKAGE_px5g-wolfssl=y` into the buildbot's seed config for the
> next release should provide optional HTTPS in the next release.

please note that LuCI is currently quite broken using the libustream-wolfssl
backend, definitely not in a releasable shape.

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Merged: libnetfilter-conntrack: update to 1.0.8

2020-12-14 Thread Jo-Philipp Wich
Merged into master at
http://git.openwrt.org/?p=openwrt/openwrt.git.

Thank you!


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 1/2 iwinfo] iwinfo: add support for GCMP cipher

2021-01-05 Thread Jo-Philipp Wich
Hi,

before merging this, please extend the cmake rules in iwinfo.git to add a
SOVERSION property to the resulting libiwinfo library, this way we can adopt
ABI versio ntracking when we bump it the next time in OpenWrt.

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [IWINFO PATCH v4 1/4] iwinfo: export ht and vht operation in scan results

2021-01-05 Thread Jo-Philipp Wich
Hi,

comments inline below.

> [...]@@ -2306,6 +2306,16 @@ static void nl80211_get_scanlist_ie(struct nlattr 
> **bss,
>   iwinfo_parse_rsn(&e->crypto, ie + 6, ie[1] - 4,
>IWINFO_CIPHER_TKIP, 
> IWINFO_KMGMT_PSK);
>   break;
> + case 61: /* HT oeration */

Wrap the next three lines into  if (ie[1] >= 3) { ... } to avoid reading
beyond buffer end on malformed data.

> + e->ht_chan_info.primary_chan = ie[2];
> + e->ht_chan_info.secondary_chan_off = ie[3] & 0x3;
> + e->ht_chan_info.chan_width = (ie[4] & 0x4)>>2;
> + break;
> + case 192: /* VHT operation */

Wrap the next three lines into  if (ie[1] >= 3) { ... } to avoid reading
beyond buffer end on malformed data.

> + e->vht_chan_info.chan_width = ie[2];
> + e->vht_chan_info.center_chan_1 = ie[3];
> + e->vht_chan_info.center_chan_2 = ie[4];
> + break;
>   }
>  
>   ielen -= ie[1] + 2;
> 

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [IWINFO PATCH v4 2/4] iwinfo: export center_chan info for local wifi

2021-01-05 Thread Jo-Philipp Wich
Hi,

comments below.

> [...]
> diff --git a/include/iwinfo.h b/include/iwinfo.h
> index 676db91..680f384 100644
> --- a/include/iwinfo.h
> +++ b/include/iwinfo.h
> @@ -282,6 +282,8 @@ struct iwinfo_ops {
>   int (*survey)(const char *, char *, int *);
>   int (*lookup_phy)(const char *, char *);
>   void (*close)(void);

Move these before the lookup_phy function:

> [...]
> @@ -3242,5 +3314,7 @@ const struct iwinfo_ops nl80211_ops = {
>   .countrylist  = nl80211_get_countrylist,
>   .survey   = nl80211_get_survey,
>   .lookup_phy   = nl80211_lookup_phyname,
> - .close= nl80211_close
> + .close= nl80211_close,
> + .center_chan1 = nl80211_get_center_chan1,
> + .center_chan2 = nl80211_get_center_chan2

Please move the new function pointers before lookup_phyname.

>  };
> 



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [RPCD PATCH v4 3/4] iwinfo: add ht and vht operation info to wifi scan

2021-01-05 Thread Jo-Philipp Wich
Hi,

comments below.

> [...]
> @@ -441,6 +441,20 @@ rpc_iwinfo_scan(struct ubus_context *ctx, struct 
> ubus_object *obj,
>   blobmsg_add_u32(&buf, "quality", e->quality);
>   blobmsg_add_u32(&buf, "quality_max", e->quality_max);
>  

Only add the "ht_operation" table if there actually is ht_operation. I guess
wrapping it into  if (e->ht_chan_info.primary_chan) { ... } should do it.

> + t = blobmsg_open_table(&buf, "ht_operation");
> + blobmsg_add_u32(&buf, "primary_channel", 
> e->ht_chan_info.primary_chan);
> + blobmsg_add_string(&buf, "secondary_channel_offset", 
> ht_secondary_offset[e->ht_chan_info.secondary_chan_off]);
> + blobmsg_add_u32(&buf, "channel_width", 
> ht_chan_width[e->ht_chan_info.chan_width]);
> + blobmsg_close_table(&buf, t);
> +
> + if (e->vht_chan_info.center_chan_1) {
> + t = blobmsg_open_table(&buf, "vht_operation");
> + blobmsg_add_u32(&buf, "channel_width", 
> vht_chan_width[e->vht_chan_info.chan_width]);
> + blobmsg_add_u32(&buf, "center_freq_1", 
> e->vht_chan_info.center_chan_1);
> + blobmsg_add_u32(&buf, "center_freq_2", 
> e->vht_chan_info.center_chan_2);
> + blobmsg_close_table(&buf, t);
> + }
> +
>   rpc_iwinfo_add_encryption("encryption", &e->crypto);
>  
>   blobmsg_close_table(&buf, d);
> 

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [RPCD PATCH v4 4/4] iwinfo: export center channel for info ubus call

2021-01-05 Thread Jo-Philipp Wich
Hi,

comment below.

> [...]
> diff --git a/iwinfo.c b/iwinfo.c
> index 45ca784..94fa822 100644
> --- a/iwinfo.c
> +++ b/iwinfo.c
> @@ -364,6 +364,8 @@ rpc_iwinfo_info(struct ubus_context *ctx, struct 
> ubus_object *obj,
>  
>   rpc_iwinfo_call_int("mode", iw->mode, IWINFO_OPMODE_NAMES);
>   rpc_iwinfo_call_int("channel", iw->channel, NULL);

You need to check `iw->center_chan1` and `iw->center_chan2` for non-null
before calling them, otherwise rpcd will crash when querying wifi interfaces
not using the nl80211 backend.

Wrapping the next two lines into `if (iw->center_chan1) { ... }` should do.
Even better would be adding stubs returning `-1` to the other iwinfo backends
(madwifi, wl, wext).

> + rpc_iwinfo_call_int("center_chan1", iw->center_chan1, NULL);
> + rpc_iwinfo_call_int("center_chan2", iw->center_chan2, NULL);
>  
>   rpc_iwinfo_call_int("frequency", iw->frequency, NULL);
>   rpc_iwinfo_call_int("frequency_offset", iw->frequency_offset, NULL);
> 

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: R: [RPCD PATCH v4 3/4] iwinfo: add ht and vht operation info to wifi scan

2021-01-06 Thread Jo-Philipp Wich
Hi,

> I didn't add the check here as we can assume that ht_operation are always 
> present.
> Should I add this anyway? 

why can we assume it? They way I see it, HT info is only populated if IE type
61 was present, valid and parsed from BSS info, otherwise the structure mightr
be present but zero-initialized.

It is counter-intuitive to include a `"ht_operation": { ... }` object in the
JSON dump for legacy stations that do not present this information.

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 1/3] rules: add commitcount function

2021-01-07 Thread Jo-Philipp Wich
Hi,

I think this change will introduce massive overhead during the DUMP phase of
the buildroot when scanning package metadata.

You should wrap the logic into an `ifneq ($(DUMP),1)` or similar and simply
return a static placeholder value if DUMP==1

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] wireguard-tools: allow generating private_key

2021-01-08 Thread Jo-Philipp Wich
Hi,

I'm afraid this approach is not really acceptable. Automatically calling `uci
commit` outside of the early-boot / uci-defaults context is not safe.

There could be arbitrary user defined, intentionally uncommitted changes
stashed when the ifup sequence is running which you would inadvertently commit
along with the key option change.

So, a NACK from me.

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Add package version dependency for point releases

2021-01-11 Thread Jo-Philipp Wich
Hi,

why not simply wrap the workaround in a uname or /proc/version check?

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Dnsmasq 2.83 causes log spam

2021-01-22 Thread Jo-Philipp Wich
Hi Hannu,

unfortunately we lack a reliable reproducer so far.

A packet capture would be most helpful, another option would be a bisect of
the intermediate dnsmasq Git revisions.

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Job board support on openwrt.org?

2021-01-23 Thread Jo-Philipp Wich
Hi,

I don't think this is a good idea due to legal obligations,
administrative hassle, quality of work issues and so on.

NACK from me.

~ Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Revisiting ABI_VERSION handling policy

2021-02-09 Thread Jo-Philipp Wich
Hi,

> The goal of reducing unnecessary build churn makes perfect sense to me,
> but I think we need to reconsider the trade-off we're making here, and
> the failure modes of each option.

the motivation wasn't about build-churn at all but to ensure that library
packages can be cleanly upgraded and that different versions of libraries can
coexist on the same system without trashing userspace mid-upgrade. The other
major consideration is hard package version dependencies to ensure that
library users actually depend on the binary library ABI version they've been
linked against at build time.

> I believe that having to manually consider whether the ABI changed when
> updating a package comes with a nasty foot-gun that can deliver very
> subtle and hard to debug failure cases.

Upgrading a very central library package like wolfSSL which is used by uclient
(and thus opkg), wpad (wireless connectivity) and uhttpd through ustream
(webinterface access) is a sensible operation. In my view, sanely maintaining
the ABI_VERSION is simply part of the work when dealing with such a package.

Throwing all that over board just because you've been annoyed by a bug that
cost you a few hours is not the right way forward. By that metric, we
should've dropped most of buildroot years ago already.

> To fix this situation, I would like to switch wolfssl and maybe a few
> other packages prone to ABI breakage back to version based ABI_VERSION.
> At least wolfssl also needs a short suffix generated from config vars.

It makes little sense to peg the ABI_VERSION to the package version, at least
without revising the packaging at the same time. The ABI version should only
change if the shipped shared objects become incompatible (or more
specifically, if the SONAME changes).

By tying the ABI version to the package version without also ensuring that the
shipped .so files are differently named, you'll also introduce file level
package conflicts. A sanely managed ABI_VERSION should ensure that it is
possible for libfoo1 (ABI_VERSION 1) and libfoo2 (ABI_VERSION 2) to coexist on
the system which is a precondition for being able to cleanly opkg-upgrading
library packages without trashing the currently running userspace.

Especially for libraries with frequent security updates like wolfSSL, I'd
rather retain this ability.

> If we want to reduce build churn, we should find a way to automate
> setting the ABI version, since clearly our package maintainers + review
> process cannot (and in my opinion also should not) be trusted with this
> extra responsibility.

It should be possible to use readelf/objdump to examine the exported symbols
of a given shared object and see if either the size of a symbol changed or if
previously present ones were removed - addition should be fine.

Maybe this is something that can be added to the FIXUP=1 stuff.

> Maybe we can replace it with a hash of all installed header files. This
> might be a better way to resolve cases like this wolfssl instance, but
> we likely will still be rebuilding dependent packages on most updates.

A hash of installed header files makes little sense imho as it does not really
tell which symbols are exported by a shared object in the end. To me it seems
you conflate two different problems here:

a) maintaining ABI versions
b) ABI depending on compile time options

Unless I missed something, it appears your original issue was due to b) and it
can be solved by appending a hash of CONFIG_* symbol values to the explicitly
set ABI version.



Regards,
Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Revisiting ABI_VERSION handling policy

2021-02-09 Thread Jo-Philipp Wich
Hi,

> The last stable update didn't change SONAME, but it included changes to
> the same data structure that triggered the bug that I ran into. It could
> very likely have introduced very similar subtle breakage.

this is a clear upstream bug then. Might make sense to look into how other
distributions deal with that.

> Looking at the abi-laboratory timeline, there have been many incremental
> wolfssl releases that did not change the SONAME, but introduced
> potentially ABI incompatible changes. In fact, it seems to me that there
> are more breaking than non-breaking updates.

That doesn't inspire confidence into wolfSSL at all then. Maybe we should
reconsider using it by default. If upstream is not able to deliver a stable
ABI for a crypto library, I'd say it isn't really fit for our purposes.

> If we were to peg the ABI_VERSION to the package version, we could still
> deliver security updates by backporting relevant patches and review
> potential ABI isuses of those patches.

If we at the same time ensure that the library SONAME is properly modified to
always match ABI_VERSION and that the packaged shared object filename matches
SONAME then it is fine for me. Merely bumping ABI_VERSION while continue
shipping the same lib*.so.123 would not work as it'd lead to the previously
mentioned file conflicts (e.g. libfoobar1.1 (ABI_VERSION:=1.1) and
libfoobar1.2 (ABI_VERSION:=1.2) both shipping libfoobar.so.123 as incorrectly
specified by upstream)

>> [...]
> The breakage that I was seeing has nothing to do with exported symbols.
> The layout of a data structure changed. I'm not sure how to detect that
> from readelf/objdump output.

Okay, I missed that. Still, not changing exported data structures while
keeping the current SONAME should be common sense for any library maintainer.

The ABI_VERSION mechanism as it is right now relies on upstream being sane
obviously. I wrongly assumed that wolfSSL does proper ABI hygiene. Apparently
it doesn't so no wonder it breaks down in subtle ways.

As for the ability to detect it - it should be possible to reconstruct
effective binary struct layout from DWARF debug info. So given debug builds of
both the old and the new library versions, the output of a utility such as
dwarfdump can be compared.

>> [...]
> How do we address this in a proper way that isn't a potential foot-gun
> on every version upgrade?

Apart from investing time on our end to paper over versioning deficiencies, we
should talk to upstream, raise awareness for proper SONAME versioning. Also
look how Debian deals with it (if at all).

~ Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Question about LuCI state (incl DSA) & request for testing

2021-02-12 Thread Jo-Philipp Wich
Hi,

> I'd like to ask: what's the current state of LuCI?
> One thing that probably requires some extra focus is DSA. Are there
> any remaining issues regarding it?

some parts of the DSA/device config code are intentionally disabled since
netifd didn't handle these things at the time it was written. That needs to be
revised yet. Also support for wireless bridge vlans is missing yet.

We also need to revise the default network configuration of DSA devices to
declare a "switch0" bridge device by default.

While this is not strictly necessary it simplifies adding further VLANs a lot
since users are not required to redo their entire network config beforehand.


~ Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 1/2] uhttpd: Reload config after uhttpd-mod-ubus was added

2021-03-20 Thread Jo-Philipp Wich
Hi Hauke,

thanks for looking into it!

I have a couple of remarks...

> [...]
>  [ "$(uci -q get uhttpd.main.ubus_socket)" = "/var/run/ubus.sock" ] && {
>   uci set uhttpd.main.ubus_socket='/var/run/ubus/ubus.sock'
>   uci commit uhttpd
> + reload_config

That might reload other, unrelated changes. It likely isn't that much of
a problem in practise for most users but could interfere with other
provisioning setups or custom logic.

I think it is better if we simply perform a selective /etc/init.d/uhttpd
reload call here.

>  }
>  
>  exit 0
> 

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Merged: zone: avoid duplicates in devices list

2021-03-23 Thread Jo-Philipp Wich
Merged into project/firewall3.git, branch master at
http://git.openwrt.org/?p=project/firewall3.git.

Thank you!


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Merged: rules: fix device and chain usage forDSCP/MARK targets

2021-03-23 Thread Jo-Philipp Wich
Merged into project/firewall3.git, branch master at
http://git.openwrt.org/?p=project/firewall3.git.

Thank you!


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] uhttpd / startup-error without a message

2015-05-11 Thread Jo-Philipp Wich
Hi,

this is already fixed in trunk. The uhttpd stderr is relayed to syslog
there.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] uhttpd / startup-error without a message

2015-05-11 Thread Jo-Philipp Wich
Hi.

> thank you - i see:
> this is not very intuitive. can this be send to console
> when user is interactive? (like: loggger -s message)

Not easily as it is procd logging the services stderr. One can implement
a "test" or "debug" start action though which would calculate the
commandline and start the daemon in foreground without actually
registering it with procd.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] uhttpd / startup-error without a message / procd interactive logging

2015-05-11 Thread Jo-Philipp Wich
> it think thats too special - there should be a generic way to
> get direct feedback on the commandline when something fails without
> doing magic. what if we e.g. 'export INTERACTIVE=1' via /etc/profile
> so procd / a called script is aware of this?

Whats too special with "/etc/init.d/$SERVICE debug" ?

Its exactly doing what you'd normally do to hunt down the error - start
the service in foreground so you need to kill with Ctrl-C. All messages
are sent to the console then (at least in the case of uhttpd or any
other service using ulog).

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] working with quilt from './staging_dir/host/bin/quilt'

2015-05-21 Thread Jo-Philipp Wich
Hi.

Did you try something like  export
PATH="$PATH:/home/bastian/openwrt/staging_dir/host/bin" ?

If that works you could add it to your .bashrc

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] working with quilt from './staging_dir/host/bin/quilt'

2015-05-21 Thread Jo-Philipp Wich
Hi.

> meanwhile yes, but it does not work like i exspected.
> should'nt quilt open, when a patch cannot be applied cleanly?

Uhm no. At least I never encountered such behavior.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] working with quilt from './staging_dir/host/bin/quilt'

2015-05-21 Thread Jo-Philipp Wich
> my idea was to use this:
> make target/linux/{clean,prepare} V=s QUILT=1

If the patches all apply despite fuzz:

make target/linux/refresh

If they do not apply:

make target/linux/{clean,prepare} V=s QUILT=1
cd build_dir/target-*/linux-*/linux-*
quilt push -a  (will halt before the failing patch)
quilt push -f  (will forcibly put the broken patch on top of the stack)
quilt edit ... (fixup the broken patch by editing to-be-patched files)
quilt refresh  (will fixup broken patch)
quilt push -a  (will apply remainder of the series)
cd ../../../../
make target/linux/update  (copies current series back)
make target/linux/refresh (rebases all patches in case the new one
   produced fuzz in subsequent ones)

~ Jow



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Link detection - TP-Link Archer C7 v2

2015-05-27 Thread Jo-Philipp Wich
Hi Richard,

the link status is not propagated to the netdev because there's an
external switch chip between the CPU and the RJ45 plug on the outside.

There currently is no mechanism to propagate switch port states to Linux
netdev link states as such an mechanism has various implications.

For example: consider a switch port group containing five ports, 4
external RJ45 ports and one internal connected to the SoC - when would
you consider that interface down? When no port except the CPU one has a
link? Whenever a cable is plugged into one of the four ports?

Strictly speaking the missing link detection on wan is not a bug but by
design because the link between the CPU and the switch is always
established, it never goes down - its just a trace on the PCB.

Currently the WAN port link state detection only works on boards that
have a dedicated phy for their WAN and no intermediate programmable switch.

If you would want to work on that you'd need to propagate the swconfig
link state information to the connected netdev, but that already is a
problem since there is no programmatic way to relate a given netdev to a
switch device (e.g. is it eth0 or eth1 connected to switch0?).

Such information needs to be hardcoded per model, maybe encoded in the
board config code.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created

2015-05-27 Thread Jo-Philipp Wich
Hi,

patch is fine with me however there's a typo in the error message:
  "failed to work directory"

This should get corrected (and upstream notified about it as well).

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created

2015-05-27 Thread Jo-Philipp Wich
Hi.
> e.g. 'failed to create work directory'?

Yeah, I assume that was the intended meaning of the message.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created

2015-05-27 Thread Jo-Philipp Wich
On 05/27/2015 06:58 PM, Bastian Bittorf wrote:
> This is the case e.g. if JFFS2 partition is full.
> 
> see: https://www.mail-archive.com/linux-unionfs@vger.kernel.org/msg00246.html
> (a small error in a logmessage was changed and reported upstream)
> 
> runtime tested on ar71xx with kernel 3.18.11 and r45772
> this paritially fixes #19564
> 
> Signed-off-by: Bastian Bittorf 

Acked-by: Jo-Philipp Wich 

> ---
>  ...-overlayfs-fallback-to-readonly-when-full.patch |  109 
> 
>  1 file changed, 109 insertions(+)
>  create mode 100644 
> target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch
> 
> diff --git 
> a/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch
>  
> b/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch
> new file mode 100644
> index 000..21f11fd
> --- /dev/null
> +++ 
> b/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch
> @@ -0,0 +1,109 @@
> +[linux-unionfs added to Cc]
> +
> +On Tue, May 19, 2015 at 09:51:20AM +0200, Bastian Bittorf wrote:
> +> Hi Miklos,
> +>
> +> sorry for writing directly to you, feel free to forward
> +> this to the appropriate mailinglist.
> +>
> +> we have a problem with mainline overlay filesystem on kernel 3.18:
> +> https://dev.openwrt.org/ticket/19564
> +>
> +> 2 things are odd:
> +> when the working filesystem is full, overlays fails with:
> +>
> +> overlayfs: failed to create directory /overlay/work/work
> +>
> +> what is strange, that we call it with:
> +>
> +> mount(overlay, "/mnt", "overlay", MS_NOATIME, lowerdir)
> +>
> +> see here:
> +> 
> http://nbd.name/gitweb.cgi?p=fstools.git;a=blob;f=libfstools/mount.c;h=81176ce399b4cd8e2d347c0008c13dec92407f55;hb=e6004000ff15d7bd32cf5663e8690fc94d7ec747#l125
> +>
> +> do you have an idea whats wrong?
> +> 1) is it really needed, that we need space for creating dir 
> "/overlay/work"?
> +> 2) why does overlay need "/overlay/work/work"?
> +
> +The work directory is needed for atomic copy-up and similar.  It is not 
> actually
> +necessary to mount a read-only overlay.  Post 4.0 it is possible to mount the
> +overlay without workdir (but even then it won't happen automatically in case 
> the
> +upper fs is full, so this should be fixed in the latest kernel too).
> +
> +Could you please try the following patch?  If the workdir can't be created it
> +will fall back to mounting the overlay read-only.
> +
> +Thanks,
> +Miklos
> +
> +---
> + fs/overlayfs/copy_up.c |3 +++
> + fs/overlayfs/dir.c |9 +
> + fs/overlayfs/super.c   |   12 +---
> + 3 files changed, 21 insertions(+), 3 deletions(-)
> +
> +--- a/fs/overlayfs/copy_up.c
>  b/fs/overlayfs/copy_up.c
> +@@ -300,6 +300,9 @@ int ovl_copy_up_one(struct dentry *paren
> + struct cred *override_cred;
> + char *link = NULL;
> +
> ++if (WARN_ON(!workdir))
> ++return -EROFS;
> ++
> + ovl_path_upper(parent, &parentpath);
> + upperdir = parentpath.dentry;
> +
> +--- a/fs/overlayfs/dir.c
>  b/fs/overlayfs/dir.c
> +@@ -222,6 +222,9 @@ static struct dentry *ovl_clear_empty(st
> + struct kstat stat;
> + int err;
> +
> ++if (WARN_ON(!workdir))
> ++return ERR_PTR(-EROFS);
> ++
> + err = ovl_lock_rename_workdir(workdir, upperdir);
> + if (err)
> + goto out;
> +@@ -322,6 +325,9 @@ static int ovl_create_over_whiteout(stru
> + struct dentry *newdentry;
> + int err;
> +
> ++if (WARN_ON(!workdir))
> ++return -EROFS;
> ++
> + err = ovl_lock_rename_workdir(workdir, upperdir);
> + if (err)
> + goto out;
> +@@ -506,6 +512,9 @@ static int ovl_remove_and_whiteout(struc
> + struct dentry *opaquedir = NULL;
> + int err;
> +
> ++if (WARN_ON(!workdir))
> ++return -EROFS;
> ++
> + if (is_dir) {
> + opaquedir = ovl_check_empty_and_clear(dentry);
> + err = PTR_ERR(opaquedir);
> +--- a/fs/overlayfs/super.c
>  b/fs/overlayfs/super.c
> +@@ -740,9 +740,15 @@ static int ovl_fill_super(struct super_b
> + ufs->workdir = ovl_workdir_create(ufs->upper_mnt, workpath.dentry);
> + err = PTR_ERR(ufs->workdir);
> + if (IS_ERR(ufs->workdir)) {
> +-pr_err("overlayfs: failed to create directory %s/%s\n",
> +-   ufs->config.workdir, OVL_WORKDIR_NAME);
> +-goto out_put_lo

Re: [OpenWrt-Devel] [PATCH] Add sch_fq and sch_pie to the kmod-sched package.

2015-06-03 Thread Jo-Philipp Wich
Hi,

> The .ipk goes from 46018 to 52793 bytes. Can't seem to get the image
> size to change, probably some issue with my build setup...

The image is padded to whole eraseblocks, so if the squashfs size does
not change then the added code fits into the remaining space of an
eraseblock.

~ Jow



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] netifd: handling of interfaces with proto "none"

2015-06-08 Thread Jo-Philipp Wich
Hi Lars,

I struggled with this issue as well and after a brief chat with nbd the 
conclusion was to force the tap device to be "external", this will cause
netifd to leave its routes and address config alone, even when ifup is 
called on the network.

In short you need to prepare the vpn interface without any ifname option,
using something like that:

  # prepare network if not existing yet
  if ! uci -q get network.${netname}; then
uci set network.${netname}=interface
uci set network.${netname}.proto=none
ubus call network reload
  fi

  # externally attach netdev
  ubus call network.interface.${netname} add_device '{ "name": "'$ifname'" }'


If you then call "ifstatus" on $netname you should see "device" and
"l3_device" pointing to "$ifname". Calling "devstatus" on $ifname should
display "external: true".


HTH,
Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] x86_64 packages missing

2015-06-10 Thread Jo-Philipp Wich
Hi,

the 64 target is now a subtarget of x86, so you can find those packages
here:

https://downloads.openwrt.org/snapshots/trunk/x86/64/packages/

Basically replace "x86_64" with "x86/64" in your opkg.conf


HTH,
Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Method to load firmware blob for a particular router model

2015-06-14 Thread Jo-Philipp Wich
Hi,

> So how do I write a firmware blob into /lib/firmware into the build
> process without the hassle of creating a metapackage?

$ mkdir -p files/lib/firmware
$ wget -O files/lib/firmware/blah.bin http://example.org/blah.bin
$ make

Or do you mean how to integrate it into the repository?
In that case you'd need to add the file to

 target/linux/ar71xx/base-files/lib/firmware/blah.bin

~ Jow



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] libusb-compat: fix build with musl

2015-06-17 Thread Jo-Philipp Wich
Hi Álvaro,

hmm, I have no issues building it under musl here. The buildbots seems
to report no errors either.

Can you provide a diffconfig.sh output?

Btw, you do not need to replace all types, u_int{8,16,32,64}_t is
exposed by musl if you include  *and* if _GNU_SOURCE is
defined.

~ Jow



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] libusb-compat: fix build with musl

2015-06-18 Thread Jo-Philipp Wich
Hi Álvaro,

I see. The proper place to fix it is flashrom, it needs to include
 before including libusb headers and its Makefile needs to
define -D_GNU_SOURCE or -std=gnu99


Regards,
Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH procd] service: use PTY (instead of a pipe) for reading service output

2015-06-19 Thread Jo-Philipp Wich
Hi.

> Do you have any other idea?

Yes, we create a shared library which calls setbuf(stderr/out, NULL) in
an __attribute__((constructor)) function, then specify this library in
LD_PRELOAD when exec'ing stdio-relay enabled processes from procd.

This is equivalent to the implementation used by the coreutils "stdbuf"
applet.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH procd] service: start apps with LD_PRELOAD & lib disabling buffering

2015-06-20 Thread Jo-Philipp Wich
Hi John,

> i dont like this idea at all. calling ld-preload on every started app
> just seems wrong

I was the one suggesting the idea since we needed a solution which does
not require modification of downstream programs. We could restrict the
preloading to programs which requested stdio relaying support from procd
and not preload for the rest.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [package] strace: update to 4.10

2015-06-25 Thread Jo-Philipp Wich
Applied in r46124 - thanks!

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] [package] grub2: disable stack-protector

2015-06-25 Thread Jo-Philipp Wich
Applied in r46126 - thanks!

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [package] grub2: fix musl build

2015-06-25 Thread Jo-Philipp Wich
Hi Dirk,

I committed a different approach that basically turns the __GLIBC__
guards into !__UCLIBC__ ones.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] iwinfo lua scanlist issue

2015-06-29 Thread Jo-Philipp Wich
Hi Peter,

I suspect the culprit is nl80211_wait() which calls nl_recvmsgs()
internally.

To overcome this problem we need to restructure the nl80211 code to use
nonblocking sockets and then extend the nl80211_wait() implementation to
have a timeout.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] iwinfo lua scanlist issue

2015-06-29 Thread Jo-Philipp Wich
Not really as the core issue is always within the same C code, however
you access it.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 14.07 SDK - iostream.h not found

2015-07-03 Thread Jo-Philipp Wich
Hi,

this has been fixed with r46162. The SDK releases for 15.05-rc1 and
15.05-rc2 are affected as well.

To solve the problem locally you can apply the following sed command:

  sed -i -e 's!/[^ ]*/staging_dir/[^/]*/!$STAGING_DIR/!g' \
staging_dir/toolchain-*/bin/g++-uc*


~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Chaos Calmer 15.05 package build failures in SDK

2015-07-17 Thread Jo-Philipp Wich
Hi Daniel,

please test whether the following patch solves the shared library problem:

~ Jow

--
diff --git a/include/toplevel.mk b/include/toplevel.mk
index bbeb7eb..11b2dd9 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -24,8 +24,8 @@ OPENWRTVERSION:=$(RELEASE)$(if $(REVISION), ($(REVISION)))
 export RELEASE
 export REVISION
 export OPENWRTVERSION
-export LD_LIBRARY_PATH:=$(subst ::,:,$(if 
$(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib)
-export DYLD_LIBRARY_PATH:=$(subst ::,:,$(if 
$(DYLD_LIBRARY_PATH),$(DYLD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib)
+export LD_LIBRARY_PATH:=$(subst ::,:,$(if 
$(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)$(TOPDIR)/staging_dir/host/lib)
+export DYLD_LIBRARY_PATH:=$(subst ::,:,$(if 
$(DYLD_LIBRARY_PATH),$(DYLD_LIBRARY_PATH):)$(TOPDIR)/staging_dir/host/lib)
 export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
 export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] tools/quilt: fix build error during kernel_menuconfig on a cleaned env

2015-07-22 Thread Jo-Philipp Wich
Hi,

this was originally done to fix quilt in the SDK. Did you test it there
after your change?

~ Jow



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Workaround: saved administration site user and pass may appear on the Wireless configuration page, replacing the WPA key

2015-07-27 Thread Jo-Philipp Wich
Applied to master and for-15.05 - thanks!

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Allow editing of AP channel when all client networks are disabled

2015-07-27 Thread Jo-Philipp Wich
Applied to master and for-15.05 - thanks!

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Fix: Status for disabled wireless networks may display the SSID, BSSID and Mode of an active network on the same radio

2015-07-27 Thread Jo-Philipp Wich
Applied to master and for-15.05 - thanks!

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Fix: A disabled wireless network may be shown as enabled, when multiple networks are defined on the same radio

2015-07-27 Thread Jo-Philipp Wich
Applied to master and for-15.05 - thanks!

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx: RB435G PCI does not support minipci sata module (PER-C20S)

2015-08-17 Thread Jo-Philipp Wich
Hi.

> Is the PCI subsystem on this board supported only for wireless cards?

Yes. The hardware controller cannot handle PCI I/O resources, therefore
only a subset of available miniPCI cards do work with it.

Anything requiring I/O resources is a no-go.

HTH,
Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ubus request through AJAX issue

2015-09-01 Thread Jo-Philipp Wich
Hi,

the number 2 corresponds to "UBUS_STATUS_INVALID_ARGUMENT" so your AJAX
call is submitting invalid data.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v4] base-files: add /etc/profile.d support

2015-09-04 Thread Jo-Philipp Wich
Hi.

> Why the -e?  You only got existing files in the glob above right? 

Almost. If the directory does not exist or is empty then the glob
pattern is returned literally, e.g. "echo /tmp/*" will expand to a list
of files but "echo /does_not_exist/*" will return "/does_not_exist/*"
literaly so the for-in loop will run once with the literal glob pattern
as argument, therefore the "-e" test is required.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH][RFC] x86: Save and restore partition table during upgrade

2016-01-17 Thread Jo-Philipp Wich
Hi.

> This patch will save the partition table before an upgrade.
> If the installed image has not changed the partition structure
> the saved table will be restored, ensuring any user created
> partitions will be present after the upgrade.

That sounds odd. If I'd start to rely on such a feature I'd be really
surprised if my partition table suddenly was not backed up after an
upgrade.

Can you please elaborate some more on the intended use case?
Some other stylistic comments inline.

> An option is added to sysupgrade to disable this feature.
> 
> Signed-off-by: Rob Mosher 
> ---
>  package/base-files/files/lib/upgrade/common.sh |  1 +
>  package/base-files/files/sbin/sysupgrade   |  3 ++
>  target/linux/x86/Makefile  |  2 +
>  .../linux/x86/base-files/lib/upgrade/platform.sh   | 45 
> ++
>  4 files changed, 51 insertions(+)
> 
> diff --git a/package/base-files/files/lib/upgrade/common.sh 
> b/package/base-files/files/lib/upgrade/common.sh
> index 761b4c1..aed7f8e 100644
> --- a/package/base-files/files/lib/upgrade/common.sh
> +++ b/package/base-files/files/lib/upgrade/common.sh
> @@ -67,6 +67,7 @@ run_ramfs() { #  [...]
>   install_bin /usr/sbin/ubirsvol
>   install_bin /usr/sbin/ubirmvol
>   install_bin /usr/sbin/ubimkvol
> + install_bin /usr/sbin/sfdisk
>   for file in $RAMFS_COPY_BIN; do
>   install_bin ${file//:/ }
>   done
> diff --git a/package/base-files/files/sbin/sysupgrade 
> b/package/base-files/files/sbin/sysupgrade
> index 93f0749..2f441f8 100755
> --- a/package/base-files/files/sbin/sysupgrade
> +++ b/package/base-files/files/sbin/sysupgrade
> @@ -10,6 +10,7 @@ export INTERACTIVE=0
>  export VERBOSE=1
>  export SAVE_CONFIG=1
>  export SAVE_OVERLAY=0
> +export SAVE_PARTITIONS=1
>  export DELAY=
>  export CONF_IMAGE=
>  export CONF_BACKUP_LIST=0
> @@ -29,6 +30,7 @@ while [ -n "$1" ]; do
>   -q) export VERBOSE="$(($VERBOSE - 1))";;
>   -n) export SAVE_CONFIG=0;;
>   -c) export SAVE_OVERLAY=1;;
> + -p) export SAVE_PARTITIONS=0;;
>   -b|--create-backup) export CONF_BACKUP="$2" NEED_IMAGE=1; 
> shift;;
>   -r|--restore-backup) export CONF_RESTORE="$2" NEED_IMAGE=1; 
> shift;;
>   -l|--list-backup) export CONF_BACKUP_LIST=1; break;;
> @@ -62,6 +64,7 @@ upgrade-option:
>   -i   interactive mode
>   -c   attempt to preserve all changed files in /etc/
>   -n   do not save configuration over reflash
> + -p   do not attempt to restore the partition table after flash.
>   -T | --test
>Verify image and config .tar.gz but do not actually flash.
>   -F | --force
> diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
> index e4bc0d9..e5b4378 100644
> --- a/target/linux/x86/Makefile
> +++ b/target/linux/x86/Makefile
> @@ -13,6 +13,8 @@ FEATURES:=squashfs ext4 vdi vmdk pcmcia targz
>  SUBTARGETS=generic xen_domu ep80579 geode kvm_guest 64
>  MAINTAINER:=Felix Fietkau 
>  
> +DEFAULT_PACKAGES += sfdisk
> +
>  KERNEL_PATCHVER:=4.4
>  
>  KERNELNAME:=bzImage
> diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh 
> b/target/linux/x86/base-files/lib/upgrade/platform.sh
> index 73ab5ef..7f5a2b1 100644
> --- a/target/linux/x86/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
> @@ -55,12 +55,57 @@ platform_copy_config() {
>   fi
>  }
>  
> +save_bootparts() {
> + disk=${BOOTPART%[0-9]}
> + if [ -b $disk ]; then
> + echo "Backing up partition table..."
> + sfdisk -d $disk > /tmp/sfdisk.before
> + grep size= /tmp/sfdisk.before | grep -E -v 'size=\s+0,' > 
> /tmp/sfdisk.before.nonempty

Why two "grep" invocations here? Also always quote variables please.

> + fi
> +}
> +
> +restore_bootparts() {
> + disk=${BOOTPART%[0-9]}
> + if [ -b $disk ]; then
> + sfdisk -d $disk > /tmp/sfdisk.after
> + grep size= /tmp/sfdisk.after | grep -E -v 'size=\s+0,' > 
> /tmp/sfdisk.after.nonempty

Avoid the duplicate grep.

> + before=$(cat /tmp/sfdisk.before.nonempty)
> + after=$(cat /tmp/sfdisk.after.nonempty)

Always quote variables.

> +
> + #ensure we have both partition tables

This comment is superfluous.

> + if [ -z "$before" -o -z "$after" ]; then
> + echo "Could not read partition table"
> + return 1
> + fi
> + 
> + #if nothing changed, we do not need to restore
> + if [ "$before" = "$after" ]; then
> + echo "Parition layout unchanged"
> + return 0
> + fi
> +
> + diff=$(grep -F -x -v -f /tmp/sfdisk.before.nonempty 
> /tmp/sfdisk.after.nonempty)
> +
> + #if partition layout changed, do not restore

This comment is superf

Re: [OpenWrt-Devel] [PATCH 1/1] package/libs/libiconv: function names

2016-01-18 Thread Jo-Philipp Wich
Applied in r48301 - thanks!

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH][package] Allow UCI dhcp classifier to accept a list of MAC

2016-01-18 Thread Jo-Philipp Wich
Hi.

The change is fine with me but shouldn't we keep checking whether
there's at least one mac given?

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/4] base-files: add option to specify netdev led mode in configuration generation

2016-01-19 Thread Jo-Philipp Wich
Hi,

see inline comments.

~ Jow

On 01/07/2016 01:40 AM, Tal Keren wrote:
> This is necessary for controlling leds of RJ45 port, when one indicate the 
> link
> status and the other indicate data transfer.
> 
> Signed-off-by: Tal Keren 
> ---
>  package/base-files/files/bin/config_generate   | 7 ---
>  package/base-files/files/lib/functions/uci-defaults.sh | 2 ++
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/package/base-files/files/bin/config_generate 
> b/package/base-files/files/bin/config_generate
> index 9218788..4f257e4 100755
> --- a/package/base-files/files/bin/config_generate
> +++ b/package/base-files/files/bin/config_generate
> @@ -257,11 +257,12 @@ generate_led() {
>   ;;
>  
>   netdev)
> - local device
> - json_get_vars device
> + local device mode
> + json_get_vars device mode
> + [ -n "$mode" ] || mode='link tx rx'

Remove this check/set.

>   uci -q batch <<-EOF
>   set system.$cfg.trigger='netdev'
> - set system.$cfg.mode='link tx rx'
> + set system.$cfg.mode='$mode'

Use "set system.$cfg.mode='${mode:-link tx rx}'" here.

>   set system.$cfg.dev='$device'
>   EOF
>   ;;
> diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
> b/package/base-files/files/lib/functions/uci-defaults.sh
> index de3f180..c0ff98a 100755
> --- a/package/base-files/files/lib/functions/uci-defaults.sh
> +++ b/package/base-files/files/lib/functions/uci-defaults.sh
> @@ -355,6 +355,7 @@ ucidef_set_led_netdev() {
>   local name="$2"
>   local sysfs="$3"
>   local dev="$4"
> + local mode="$5"
>  
>   json_select_object led
>  
> @@ -363,6 +364,7 @@ ucidef_set_led_netdev() {
>   json_add_string type netdev
>   json_add_string sysfs "$sysfs"
>   json_add_string device "$dev"
> + [ -n "$mode" ] && json_add_string mode "$mode"

Remove the [ -n ... ] test, empty values are ignored and do not result
in a set.

>   json_select ..
>  
>   json_select ..
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/4] base-files: add option to specify netdev led mode in configuration generation

2016-01-19 Thread Jo-Philipp Wich
Hi,

thought some more about it and we want to have the proper defaults in
board.json already, therefore disregard my previous comments and stick
to the ones below. Sorry for the bikeshedding here.

Thanks,
Jow

> On 01/07/2016 01:40 AM, Tal Keren wrote:
>> This is necessary for controlling leds of RJ45 port, when one indicate the 
>> link
>> status and the other indicate data transfer.
>>
>> Signed-off-by: Tal Keren 
>> ---
>>  package/base-files/files/bin/config_generate   | 7 ---
>>  package/base-files/files/lib/functions/uci-defaults.sh | 2 ++
>>  2 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/package/base-files/files/bin/config_generate 
>> b/package/base-files/files/bin/config_generate
>> index 9218788..4f257e4 100755
>> --- a/package/base-files/files/bin/config_generate
>> +++ b/package/base-files/files/bin/config_generate
>> @@ -257,11 +257,12 @@ generate_led() {
>>  ;;
>>  
>>  netdev)
>> -local device
>> -json_get_vars device
>> +local device mode
>> +json_get_vars device mode
>> +[ -n "$mode" ] || mode='link tx rx'

Still remove this check/set.

>>  uci -q batch <<-EOF
>>  set system.$cfg.trigger='netdev'
>> -set system.$cfg.mode='link tx rx'
>> +set system.$cfg.mode='$mode'

Keep as you proposed already.

>>  set system.$cfg.dev='$device'
>>  EOF
>>  ;;
>> diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
>> b/package/base-files/files/lib/functions/uci-defaults.sh
>> index de3f180..c0ff98a 100755
>> --- a/package/base-files/files/lib/functions/uci-defaults.sh
>> +++ b/package/base-files/files/lib/functions/uci-defaults.sh
>> @@ -355,6 +355,7 @@ ucidef_set_led_netdev() {
>>  local name="$2"
>>  local sysfs="$3"
>>  local dev="$4"
>> +local mode="$5"
>>  
>>  json_select_object led
>>  
>> @@ -363,6 +364,7 @@ ucidef_set_led_netdev() {
>>  json_add_string type netdev
>>  json_add_string sysfs "$sysfs"
>>  json_add_string device "$dev"
>> +[ -n "$mode" ] && json_add_string mode "$mode"

Still remove the [ -n ... ] test and replace the line with
  json_add_string mode "${mode:-link tx rx}"

> 
>>  json_select ..
>>  
>>  json_select ..
>>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question about custom script at init on Trunk.-

2016-01-27 Thread Jo-Philipp Wich
Hi,

> So, /etc/uci-defaults/z999-something works, but is there a
> better way?

Not yet - but we could start changing packages to use numerical
prefixes. I do not suppose that sooo many uci-default scripts are used.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Native IPv6 Broken in recent trunk

2016-02-09 Thread Jo-Philipp Wich
Hi.

> config interface 'lan'
> option force_link '1'
> option type 'bridge'
> option proto 'static'
> option netmask '255.255.255.0'
> option ip6assign '64'
> option dns 'x'
> option ipaddr '172.18.18.1'
> option _orig_ifname 'eth0.1 wlan0 wlan0-1 wlan1'
> option _orig_bridge 'true'
> option ifname 'eth0.1'
> 
> config interface 'wan'
> option _orig_ifname 'eth0.2'
> option _orig_bridge 'false'
> option proto 'pppoe'
> option username 'xxx'
> option password 'xx'
> option peerdns '0'
> option dns ''
> option ifname 'eth0.2'
> option ipv6 'auto'
> 
> config interface 'wan6'
> option proto 'dhcpv6'
> option dns ''
> option peerdns '0'
> option reqaddress 'try'
> option reqprefix '64'
> option _orig_ifname '@wan'
> option _orig_bridge 'false'
> option ifname 'eth0.2'

This should most likely be either "pppoe-wan" or "@wan",
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Plans for CC 15.05.1 or DD 16.xx release?

2016-02-10 Thread Jo-Philipp Wich
The release will be delayed due to infrastructure problems.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/4] uci: add support for speed_mask to switch LED init scripts

2016-02-12 Thread Jo-Philipp Wich
Hi.

>   switch)
> - local port_mask
> - json_get_vars port_mask
> + local port_mask speed_mask
> + json_get_vars port_mask speed_mask
>   uci -q batch <<-EOF
>   set system.$cfg.port_mask='$port_mask'
>   EOF
> + if [ -n "$speed_mask" ] ; then
> + uci -q batch <<-EOF
> + set system.$cfg.speed_mask='$speed_mask'

A batch "set" operation without a value results in a no-op so you can
drop the outer [ -n "$speed_mask" ] test and move the new set into the
existing batch.

> + EOF
> + fi

[...]

> @@ -419,6 +420,7 @@ ucidef_set_led_switch() {
>   json_add_string sysfs "$sysfs"
>   json_add_string trigger "$trigger"
>   json_add_string port_mask "$port_mask"
> + [ -n "$speed_mask" ] && json_add_string speed_mask "$speed_mask"

Same here, empty values do not result in a new key within the json
object so the [ -n "$speed_mask" ] test is superfluous, just drop it.

>   json_select ..
>  
>   json_select ..
> 


~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] uci_lookup_ptr() seg fault

2016-02-17 Thread Jo-Philipp Wich
Hi.
> I am getting seg fault sometimes on the uci_lookup_ptr() call. here is
> the way I call this function:
> It happens I would say once every couple of hundred calls.

My gut feeling is that one of the "file_name", "section_name",
"section_value" or "option_name" pointers becomes stale.

Your quoted code looks correct, the issue is most likely in another part
of your application using the "get_uci_option_api()" function.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Setting uci defaults in trunk

2016-02-26 Thread Jo-Philipp Wich
Hi.

> In r48800 this file seems to have been replaced by
> /etc/board.d/02_network instead. Unfortunately "raw" uci commands does
> not work since its generating /etc/board.json instead? Am I correct?
> 
> If I do this then "dhcp" is ignored and the interface is set to static
> anyway:
> ucidef_set_interface_lan "eth0" "dhcp"

This sounds like a bug to me, it is supposed to work. Please post your
used board.d script and the resulting board.json.

> How to convert the wireless and the hostname I have no idea?

You can still use uci-defaults for that.

> Next is led. I had this in /etc/uci-defaults/02_network:
> ucidef_set_led_netdev "lan_act" "LANACT" "tellstick:green:lan" "eth0"
> ucidef_set_led_netdev "lan_link" "LANLINK" "tellstick:orange:lan" "eth0"
> uci set system.led_lan_act.mode='tx rx'
> uci set system.led_lan_link.mode='link'

I added support for passing the mode with
 https://dev.openwrt.org/changeset/48806
so your lines should become:

ucidef_set_led_netdev "lan_act" "LANACT" "tellstick:green:lan" \
"eth0" "tx rx"

ucidef_set_led_netdev "lan_link" "LANLINK" "tellstick:orange:lan" \
"eth0" "link"


~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Read-only mirror https://github.com/openwrt/openwrt is stuck since 12 days ago

2016-03-08 Thread Jo-Philipp Wich
Hi.

> Not to pile on, but is there any way to have the commit hashes on github
> match those at openwrt.org (e.g., a true mirror)?

No. We'll make the openwrt.git on github available as
git.openwrt.org/source.git eventually but git.openwrt.org/openwrt.git
will stay as-is.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/5] [package] iptables: Disable IPv6 support

2016-03-08 Thread Jo-Philipp Wich
Hi,

your change makes no sense, the logic is the very same.

It is possible that yours is not even working and will now always
disable IPv6, even if its actually enable.

I believe the actual problem is that CONFIG_IPV6 refers to the kernel
config symbol here, not to the one from our build .config.

~ Jow

On 08.03.2016 19:55, Ronaldo Afonso wrote:
> I was trying to disable IPv6 support when compiling OpenWrt for TP-Link
> tl-wr3040 router and got some errors compiling the iptables package.
> 
> It seems that iptables package cannot be compiled if IPv6 support was
> disabled.
> 
> Checking the Makefile for iptables package I think I found something
> wrong with the "--disable-ipv6" configure argument option.
> 
> The patch that follows solved the problem.
> 
> Signed-off-by: Ronaldo Afonso  >
> 
> diff --git a/package/network/utils/iptables/Makefile
> b/package/network/utils/iptables/Makefile
> index 6f7529c..4e2c4c8 100644
> --- a/package/network/utils/iptables/Makefile
> +++ b/package/network/utils/iptables/Makefile
> @@ -434,8 +434,11 @@ CONFIGURE_ARGS += \
> --enable-devel \
> --with-kernel="$(LINUX_DIR)/user_headers" \
> --with-xtlibdir=/usr/lib/iptables \
> -   --enable-static \
> -   $(if $(CONFIG_IPV6),,--disable-ipv6)
> +   --enable-static
> +
> +ifndef ($(CONFIG_IPV6))
> +   CONFIGURE_ARGS += --disable-ipv6
> +endif
>  
>  MAKE_FLAGS := \
> $(TARGET_CONFIGURE_OPTS) \
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] downloads.openwrt.org

2016-03-08 Thread Jo-Philipp Wich
Failed builds, stay tuned.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question regarding call python script

2016-03-10 Thread Jo-Philipp Wich
Hi Jason,

no reason against it per se but it would introduce a new build prereq I
suppose. If possible we'd like to stick to things we already require
(perl, awk, shell).


Regards, Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3] ipvs: Linux IP Virtual Server kernel modules (netfilter.mk patch)

2016-03-11 Thread Jo-Philipp Wich
Hi,

seems that change fails all builds now due to undeclared symbols:

  *
  * IPVS application helper
  *
  FTP protocol helper (IP_VS_FTP) [N/m/?] (NEW) aborted!


Please fix.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH netifd] alias : Fix interface aliased on top of a static interface not getting active

2016-03-31 Thread Jo-Philipp Wich
Hi Hans,

pushed into netifd.git, thanks!

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] dnsmasq: Fix dhcp option parsing

2016-03-31 Thread Jo-Philipp Wich
Hi,

various configurations out there use "option dhcp_option ..." still, did
you check whether this works yet after your patch?

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/3] [rpcd] file: handle return output of b64_decode

2016-04-11 Thread Jo-Philipp Wich
Hi Luka,

Please use ssize_t instead.

Regards,
Jo

> Am 11.04.2016 um 18:56 schrieb Luka Perkov :
> 
> Solve this compile warning:
> 
> file.c:300:16: error: comparison of unsigned expression < 0 is always false 
> [-Werror,-Wtautological-compare]
>if (data_len < 0)
> 
> Signed-off-by: Luka Perkov 
> ---
> file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/file.c b/file.c
> index 91a55a1..6ddde32 100644
> --- a/file.c
> +++ b/file.c
> @@ -271,7 +271,7 @@ rpc_file_write(struct ubus_context *ctx, struct 
> ubus_object *obj,
>mode_t prev_mode, mode = 0666;
>int fd, rv = 0;
>void *data = NULL;
> -size_t data_len = 0;
> +int data_len = 0;
> 
>blobmsg_parse(rpc_file_rw_policy, __RPC_F_RW_MAX, tb,
>  blob_data(msg), blob_len(msg));
> -- 
> 2.8.0
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rsync mirror of download.openwrt.org ?

2016-04-12 Thread Jo-Philipp Wich
Hi Daniel,

the entire downloads.openwrt.org is around 720GB while the 15.05.1
release is 36GB in total.

Regards,
Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rsync mirror of download.openwrt.org ?

2016-04-12 Thread Jo-Philipp Wich
Hi Dape,

you need to ask Kaloz to setup rsync access for you I guess.

Regards,
Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [UCI] uci import -m duplicates list options

2016-04-15 Thread Jo-Philipp Wich
Hi.

Just truncate the destination file beforehand.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] upstream opkg

2016-04-21 Thread Jo-Philipp Wich
Hi,

Yocto made opkg unusable for us. Current upstream is *far* too big for
use in OpenWrt. The now required libarchive alone is larger than our
current opkg version.

I took a look at packaging current opkg a while back and got stuck at
bringing libarchive down to a sane size, therfor I gave up on it.

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat

2016-04-25 Thread Jo-Philipp Wich
Hi!

Thanks for the patch, I fixed the include issue directly in Git, so this
patch can be dropped and make-ext4fs should be updated in tools/ to a
newer version instead.

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat

2016-04-25 Thread Jo-Philipp Wich
Hi,

no, I only cared about make-ext4fs as I maintain this fork.

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 02/05] [tools] findutils glibc >= 2.23 compat

2016-04-25 Thread Jo-Philipp Wich
Hi,

this should be handled already, configure uses AC_HEADER_MAJOR and
mountlist.c does:

#ifdef MAJOR_IN_SYSMACROS
#include 
#define HAVE_MAJOR
...

did you patched findutils proactively or was there an actual build issue?

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [firewall3] defaults.c: remove toplevel_rule struct

2016-04-26 Thread Jo-Philipp Wich
Hi Alexandru,

pushed to master - thanks!

~ Jo

On 27.04.2016 08:16, Alexandru Ardelean wrote:
> From: Alexandru Ardelean 
> 
> Since commit 60f1444 , this struct is no longer used.
> 
> Signed-off-by: Alexandru Ardelean 
> ---
>  defaults.c | 7 ---
>  1 file changed, 7 deletions(-)
> 
> diff --git a/defaults.c b/defaults.c
> index e246949..3d210f9 100644
> --- a/defaults.c
> +++ b/defaults.c
> @@ -164,13 +164,6 @@ fw3_print_default_chains(struct fw3_ipt_handle *handle, 
> struct fw3_state *state,
>   set(defs->flags, handle->family, handle->table);
>  }
>  
> -
> -struct toplevel_rule {
> - enum fw3_table table;
> - const char *chain;
> - const char *target;
> -};
> -
>  void
>  fw3_print_default_head_rules(struct fw3_ipt_handle *handle,
>   struct fw3_state *state, bool reload)
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 1/6] netifd: Make sending DHCP release configurable via uci when client exits

2016-04-28 Thread Jo-Philipp Wich
Hi,

I assume this one supersedes "netifd: Send DHCP release when client
exits" ?

Asking because I see no deletion of the "-R" option which would be
introduced by the other patch.

If this is the case can you slightly reword it to "Add configurable DHCP
release behaviour" or something?

Sorry for the nitpicking, otherwise it is fine.

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] set mark for locally generated traffic in OUTPUT chain

2016-04-28 Thread Jo-Philipp Wich
Hi Daniel,

my stomach feeling tells me that this is okay but can you elaborate on
the change?

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] set mark for locally generated traffic in OUTPUT chain

2016-04-28 Thread Jo-Philipp Wich
Hi Daniel,

thanks for the explaination, I was missing the function context.

The change is indeed fine, pushed to firewall3.git - thanks!

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] firewall3: Fix multicast ICMPv6 replies not being sent by default anymore.

2016-05-02 Thread Jo-Philipp Wich
Hi Vittorio,

can you move the "mcdst" declaration to the top of the function?

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] load running state after lock is acquired

2016-05-02 Thread Jo-Philipp Wich
Hi Alin,

thanks! Pushed to firewall3.git.

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Introducing the LEDE project

2016-05-03 Thread Jo-Philipp Wich
Hi,

we'd like to introduce LEDE, a reboot of the OpenWrt community
.

The project is founded as a spin-off of the OpenWrt project and shares
many of the same goals.


We are building an embedded Linux distribution that makes it easy for
developers, system administrators or other Linux enthusiasts to build
and customize software for embedded devices, especially wireless routers.
 The name 'LEDE' stands for 'Linux Embedded Development Environment'.



Members of the project already include a significant share of the most
active members of the OpenWrt community.
We intend to bring new life to Embedded Linux development by creating a
community with a strong focus on transparency, collaboration and
decentralisation.



LEDE’s stated goals are:


- Building a great embedded Linux distribution with focus on stability
  and functionality.

- Having regular, predictable release cycles coupled with community
  provided device testing feedback.

- Establishing transparent decision processes with broad community
  participation and public meetings.



We decided to create this new project because of long standing issues
that we were unable to fix from within the OpenWrt project/community:


1. Number of active core developers at an all time low, no process for
   getting more new people involved.

2. Unreliable infrastructure, fixes prevented by internal disagreements
   and single points of failure.

3. Lack of communication, transparency and coordination in the OpenWrt
   project, both inside the core team and between the core team and the
   rest of the community.

4. Not enough people with commit access to handle the incoming flow of
   patches, too little attention to testing and regular builds.

5. Lack of focus on stability and documentation.



To address these issues we set up the LEDE project in a different way
compared to OpenWrt:


1. All our communication channels are public, some read-only to
   non-members to maintain a good signal-to-noise ratio.

2. Our decision making process is more open, with an approximate 50/50
   mix of developers and power users with voting rights.

3. Our infrastructure is simplified a lot, to ensure that it creates
   less maintenance work for us.

4. We have made our merge policy more liberal, based on our experience
   with the OpenWrt package github feed.

5. We have a strong focus on automated testing combined with a
   simplified release process

If you're interested in participating or want to learn more about the
project, check out https://www.lede-project.org/.


Sincerely,

Jo-Philipp Wich,
John Crispin,
Daniel Golle,

Felix Fietkau,

Hauke Mehrtens

John Crispin

Matthias Schiffer,

Steven Barth
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] conntrack: enable support for netfilter conntrack zones

2016-05-19 Thread Jo-Philipp Wich
Hi Alin,

I merged your patch into my staging tree at

https://git.lede-project.org/?p=lede/jow/staging.git;a=commitdiff;h=6c9231baa9c5341c6ee2e213618dcde72d42288b

Since your change lacked a proper Signed-off-by I added it on your
behalf. Please review the link above and give me your ACK, then I'll
push it to master after some compile testing.

Regards,
Jo

On 05/19/2016 09:54 AM, Alin Nastac wrote:
> Storage of such zones is provided by a nf_ct_ext struct, hence conntrack
> memory foot print will not be increased if zones are not used.
> ---
>  package/kernel/linux/modules/netfilter.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/kernel/linux/modules/netfilter.mk 
> b/package/kernel/linux/modules/netfilter.mk
> index 3b623e4..4d9c116 100644
> --- a/package/kernel/linux/modules/netfilter.mk
> +++ b/package/kernel/linux/modules/netfilter.mk
> @@ -68,6 +68,7 @@ define KernelPackage/nf-conntrack
>KCONFIG:= \
>  CONFIG_NETFILTER=y \
>  CONFIG_NETFILTER_ADVANCED=y \
> +CONFIG_NF_CONNTRACK_ZONES=y \
>   $(KCONFIG_NF_CONNTRACK)
>FILES:=$(foreach mod,$(NF_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).ko)
>AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNTRACK-m)))
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] busybox: sysntpd - Support for NTP servers received via DHCP(v6)

2016-05-19 Thread Jo-Philipp Wich
Hi Hans,

staged into https://git.lede-project.org/?p=lede/jow/staging.git

A few improvement ideas though;

 - maybe we can make the jsonfilter dependency conditionally depending
   on the ntpd applet
 - maybe pipe the ubus interface status dump directly to jsonfilter
 - is there any reason to not make "use_dhcp" the default?

~ Jo

On 05/19/2016 06:57 PM, Hans Dedecker wrote:
> The busybox ntpd utility currently uses ntp servers specified in uci.
> This patch allows the ntpd utility to use NTP servers received via DHCP(v6)
> Following uci parameters have been added:
> use_dhcp : enables NTP server config via DHCP(v6)
> dhcp_interface : use NTP servers received only on the specified DHCP(v6) 
> interfaces; if empty all interfaces are considered
> 
> Signed-off-by: Hans Dedecker 
> ---
> 
> The patch is based on a previous discussion held on the OpenWRT-devel mailing 
> list
> (https://lists.openwrt.org/pipermail/openwrt-devel/2016-January/039081.html) 
> as per Felix's
> comments this solution is based on procd interface service triggers
> 
>  package/utils/busybox/Makefile  |  2 +-
>  package/utils/busybox/files/sysntpd | 43 
> -
>  2 files changed, 39 insertions(+), 6 deletions(-)
> 
> diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
> index 24c064c..24e0e11 100644
> --- a/package/utils/busybox/Makefile
> +++ b/package/utils/busybox/Makefile
> @@ -42,7 +42,7 @@ define Package/busybox
>MAINTAINER:=Felix Fietkau 
>TITLE:=Core utilities for embedded Linux
>URL:=http://busybox.net/
> -  DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam
> +  DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam +jsonfilter
>MENU:=1
>  endef
>  
> diff --git a/package/utils/busybox/files/sysntpd 
> b/package/utils/busybox/files/sysntpd
> index f73bb83..5c663d7 100755
> --- a/package/utils/busybox/files/sysntpd
> +++ b/package/utils/busybox/files/sysntpd
> @@ -7,13 +7,35 @@ USE_PROCD=1
>  PROG=/usr/sbin/ntpd
>  HOTPLUG_SCRIPT=/usr/sbin/ntpd-hotplug
>  
> +get_dhcp_ntp_servers() {
> + local interfaces="$1"
> + local filter="*"
> + local network_dump interface ntpservers ntpserver
> +
> + network_dump=$(ubus call network.interface dump)
> + for interface in $interfaces; do
> + [ "$filter" = "*" ] && filter="@.interface='$interface'" || 
> filter="$filter,@.interface='$interface'"
> + done
> +
> + ntpservers=$(jsonfilter -s "$network_dump" -e 
> "@.interface[$filter]['data']['ntpserver']")
> +
> + for ntpserver in $ntpservers; do
> + local duplicate=0
> + local entry
> + for entry in $server; do
> + [ "$ntpserver" = "$entry" ] && duplicate=1
> + done
> + [ "$duplicate" = 0 ] && server="$server $ntpserver"
> + done
> +}
> +
>  validate_ntp_section() {
>   uci_validate_section system timeserver "${1}" \
> - 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
> + 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' 
> 'use_dhcp:bool:0' 'dhcp_interface:list(string)'
>  }
>  
>  start_service() {
> - local server enabled enable_server peer
> + local server enabled enable_server use_dhcp dhcp_interface peer
>  
>   validate_ntp_section ntp || {
>   echo "validation failed"
> @@ -22,6 +44,8 @@ start_service() {
>  
>   [ $enabled = 0 ] && return
>  
> + [ $use_dhcp = 1 ] && get_dhcp_ntp_servers "$dhcp_interface"
> +
>   [ -z "$server" ] && return
>  
>   procd_open_instance
> @@ -35,8 +59,17 @@ start_service() {
>   procd_close_instance
>  }
>  
> -service_triggers()
> -{
> - procd_add_reload_trigger "system"
> +service_triggers() {
> + local script name
> +
> + script=$(readlink -f "$initscript")
> + name=$(basename ${script:-$initscript})
> +
> + procd_open_trigger
> + procd_add_config_trigger "config.change" "system" /etc/init.d/$name 
> reload
> +
> + procd_add_raw_trigger "interface.*" 2000 /etc/init.d/$name reload
> + procd_close_trigger
> +
>   procd_add_validation validate_ntp_section
>  }
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] busybox: sysntpd - Support for NTP servers received via DHCP(v6)

2016-05-20 Thread Jo-Philipp Wich
Hi Hans,

> I wanted to preserve the ntp server behavior and only change the
> behavior when configured in order to keep backwards compatibility. You
> favour enabling DHCP ntp server config without explicit config ?

Personally I do because thats likely what most users expect, but then
trusting foreign NTP server advertisements might be a security sensitive
topic - on the other hand one trusts the default gateway and DNS
advertisements too, so I don't know.


> Regarding the improvements do you want me to send a patch containing
> the diff with the already staged commit or do you prefer a v2 patch ?

Whatever you prefer - I think a v2 is the easiest and I can just replace
the commit in my tree.

~ Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


  1   2   3   4   5   6   7   8   9   10   >