[sdwalker/sdwalker.github.io] f872cf: This week's update

2022-10-09 Thread Stephen Walker via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: f872cfc589b26ae39c548a789a2c925f2a772748
  
https://github.com/sdwalker/sdwalker.github.io/commit/f872cfc589b26ae39c548a789a2c925f2a772748
  Author: Stephen Walker 
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
M uscan/index-21.02.html
M uscan/index-22.03.html
M uscan/index.html

  Log Message:
  ---
  This week's update



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


Re: [PATCH] netifd: add accept_ra support

2022-10-09 Thread Jo-Philipp Wich
Hi,

> Make the "Accept Router Advertisements" configurable. This is needed if
> you do not want to use odhcp6c and let the kernel handle the RAs. This
> can save some diskspace.

NACK from me. As it will interfere with odhcp6c operation in the default setup
I don't think that it is a good idea to expose this in uci. Given that this is
a nonstandard setup anyway you can as well set this value in sysctl directly.

~ Jo



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


[PATCH] netifd: add accept_ra support

2022-10-09 Thread Nick Hainke
Make the "Accept Router Advertisements" configurable. This is needed if
you do not want to use odhcp6c and let the kernel handle the RAs. This
can save some diskspace.

Possible values are:
  0: Do not accept RA
  1: Accept RA if forwarding is disabled
  2: Accept RA even if forwarding is enabled

Signed-off-by: Nick Hainke 
---
 device.c   |  9 +
 device.h   |  3 +++
 system-linux.c | 20 
 3 files changed, 32 insertions(+)

diff --git a/device.c b/device.c
index b3d0e85..88a192f 100644
--- a/device.c
+++ b/device.c
@@ -63,6 +63,7 @@ static const struct blobmsg_policy dev_attrs[__DEV_ATTR_MAX] 
= {
[DEV_ATTR_AUTH] = { .name = "auth", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_SPEED] = { .name = "speed", .type = BLOBMSG_TYPE_INT32 },
[DEV_ATTR_DUPLEX] = { .name = "duplex", .type = BLOBMSG_TYPE_BOOL },
+   [DEV_ATTR_ACCEPT_RA] = { .name = "accept_ra", .type = 
BLOBMSG_TYPE_INT32 },
 };
 
 const struct uci_blob_param_list device_attr_list = {
@@ -280,6 +281,7 @@ device_merge_settings(struct device *dev, struct 
device_settings *n)
n->auth = s->flags & DEV_OPT_AUTH ? s->auth : os->auth;
n->speed = s->flags & DEV_OPT_SPEED ? s->speed : os->speed;
n->duplex = s->flags & DEV_OPT_DUPLEX ? s->duplex : os->duplex;
+   n->accept_ra = s->flags & DEV_OPT_ACCEPT_RA ? s->accept_ra : 
os->accept_ra;
n->flags = s->flags | os->flags | os->valid_flags;
 }
 
@@ -464,6 +466,11 @@ device_init_settings(struct device *dev, struct blob_attr 
**tb)
s->flags |= DEV_OPT_DUPLEX;
}
 
+   if ((cur = tb[DEV_ATTR_ACCEPT_RA])) {
+   s->accept_ra = blobmsg_get_u32(cur);
+   s->flags |= DEV_OPT_ACCEPT_RA;
+   }
+
device_set_disabled(dev, disabled);
 }
 
@@ -1210,6 +1217,8 @@ device_dump_status(struct blob_buf *b, struct device *dev)
blobmsg_add_u8(b, "arp_accept", st.arp_accept);
if (st.flags & DEV_OPT_AUTH)
blobmsg_add_u8(b, "auth", st.auth);
+   if (st.flags & DEV_OPT_ACCEPT_RA)
+   blobmsg_add_u32(b, "accept_ra", st.accept_ra);
}
 
s = blobmsg_open_table(b, "statistics");
diff --git a/device.h b/device.h
index 37f8c37..dc0d57b 100644
--- a/device.h
+++ b/device.h
@@ -62,6 +62,7 @@ enum {
DEV_ATTR_AUTH,
DEV_ATTR_SPEED,
DEV_ATTR_DUPLEX,
+   DEV_ATTR_ACCEPT_RA,
__DEV_ATTR_MAX,
 };
 
@@ -126,6 +127,7 @@ enum {
DEV_OPT_ARP_ACCEPT  = (1ULL << 29),
DEV_OPT_SPEED   = (1ULL << 30),
DEV_OPT_DUPLEX  = (1ULL << 31),
+   DEV_OPT_ACCEPT_RA   = (1ULL << 32),
 };
 
 /* events broadcasted to all users of a device */
@@ -203,6 +205,7 @@ struct device_settings {
bool auth;
unsigned int speed;
bool duplex;
+   unsigned int accept_ra;
 };
 
 /*
diff --git a/system-linux.c b/system-linux.c
index 0f13a99..1697f1f 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -390,6 +390,11 @@ static void system_set_acceptlocal(struct device *dev, 
const char *val)
system_set_dev_sysctl("ipv4/conf", "accept_local", dev->ifname, val);
 }
 
+static void system_set_accept_ra(struct device *dev, const char *val)
+{
+   system_set_dev_sysctl("ipv6/conf", "accept_ra", dev->ifname, val);
+}
+
 static void system_set_igmpversion(struct device *dev, const char *val)
 {
system_set_dev_sysctl("ipv4/conf", "force_igmp_version", dev->ifname, 
val);
@@ -621,6 +626,12 @@ static int system_get_arp_accept(struct device *dev, char 
*buf, const size_t buf
dev->ifname, buf, buf_sz);
 }
 
+static int system_get_accept_ra(struct device *dev, char *buf, const size_t 
buf_sz)
+{
+   return system_get_dev_sysctl("ipv6/conf", "accept_ra",
+dev->ifname, buf, buf_sz);
+}
+
 /* Evaluate netlink messages */
 static int cb_rtnl_event(struct nl_msg *msg, void *arg)
 {
@@ -1795,6 +1806,11 @@ system_if_get_settings(struct device *dev, struct 
device_settings *s)
s->arp_accept = strtoul(buf, NULL, 0);
s->flags |= DEV_OPT_ARP_ACCEPT;
}
+
+   if (!system_get_accept_ra(dev, buf, sizeof(buf))) {
+   s->accept_ra = strtoul(buf, NULL, 0);
+   s->flags |= DEV_OPT_ACCEPT_RA;
+   }
 }
 
 void
@@ -1881,6 +1897,10 @@ system_if_apply_settings(struct device *dev, struct 
device_settings *s, uint64_t
!s->multicast ? IFF_MULTICAST : 0) < 0)
s->flags &= ~DEV_OPT_MULTICAST;
}
+   if (apply_mask & DEV_OPT_ACCEPT_RA) {
+   snprintf(buf, sizeof(buf), "%u", s->accept_ra);
+   system_set_accept_ra(dev, buf);
+   }
if (apply_mask & DEV_OPT_SENDREDIRECTS)
system_set_sendredirects(dev, s->sendredirects ? "1" : "0");
if (apply_mask & 

Re: OpenWrt 21.02.4 and OpenWrt 22.03.1 release planning

2022-10-09 Thread Hauke Mehrtens

On 10/6/22 16:42, Szabolcs Hubai wrote:

Hi Hauke,


There is another LZMA ERROR 1 issue [0] for a ramips/rt3883 device.

I have sent a fix for that to GitHub as PR#10834 [1].
It's not on the master, as it is not reviewed yet.


The problem is that this device is a SEAMA device, and it got the 
"$(Device/uimage-lzma-loader)" fix already, exactly for this LZMA ERROR 
1 in the 21.02 times. [2]


Due to this, my fix is not just a oneliner, but it contains a new recipe 
to avoid future recipe misunderstandings.



Should I resend the series to ML and close my pull request?


[0]: https://github.com/openwrt/openwrt/issues/10634
[1]: https://github.com/openwrt/openwrt/pull/10834
[2]: https://git.openwrt.org/09faa73c53bd097666cbbe68176dd46cfcf80ee8


--
Thanks,
Szabolcs


Hi,

We should get this first into master and then we can try to backport it 
if needed.


Hauke

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


[PATCH] jail: ignore missing .dynamic sect

2022-10-09 Thread Yuteng Zhong via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
github issue: https://github.com/openwrt/openwrt/issues/10933

A static-linked binary doesn't have a .dynamic section, but when
starting ujail with -r or -w will automatically search for PT_DYNAMIC in
ELF and exit with failure if it is not found.

Signed-off-by: Yuteng Zhong 
---
 jail/elf.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/jail/elf.c b/jail/elf.c
index 176d046..978fc6e 100644
--- a/jail/elf.c
+++ b/jail/elf.c
@@ -236,18 +236,18 @@ int elf_load_deps(const char *path, const char *map)
unsigned long load_offset, load_vaddr;
unsigned long interp_offset;
 
-   if (elf_find_section(map, PT_LOAD, _offset, NULL, _vaddr)) {
-   ERROR("failed to load the .load section from %s\n", path);
-   return -1;
+   if (elf_find_section(map, PT_INTERP, _offset, NULL, NULL) == 0) {
+   add_path_and_deps(map+interp_offset, 1, -1, 0);
}
 
-   if (elf_find_section(map, PT_DYNAMIC, _offset, _size, NULL)) {
-   ERROR("failed to load the .dynamic section from %s\n", path);
-   return -1;
+   if (elf_find_section(map, PT_LOAD, _offset, NULL, _vaddr)) {
+   DEBUG("failed to load the .load section from %s\n", path);
+   return 0;
}
 
-   if (elf_find_section(map, PT_INTERP, _offset, NULL, NULL) == 0) {
-   add_path_and_deps(map+interp_offset, 1, -1, 0);
+   if (elf_find_section(map, PT_DYNAMIC, _offset, _size, NULL)) {
+   DEBUG("failed to load the .dynamic section from %s\n", path);
+   return 0;
}
 
int clazz = map[EI_CLASS];
-- 
2.38.0


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


[PATCH] jail: ignore missing .dynamic sect

2022-10-09 Thread zonyitoo--- via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
From: Yuteng Zhong 

github issue: https://github.com/openwrt/openwrt/issues/10933

A static-linked binary doesn't have a .dynamic section, but when
starting ujail with -r or -w will automatically search for PT_DYNAMIC in
ELF and exit with failure if it is not found.

Signed-off-by: Yuteng Zhong 
---
 jail/elf.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/jail/elf.c b/jail/elf.c
index 176d046..978fc6e 100644
--- a/jail/elf.c
+++ b/jail/elf.c
@@ -236,18 +236,18 @@ int elf_load_deps(const char *path, const char *map)
unsigned long load_offset, load_vaddr;
unsigned long interp_offset;
 
-   if (elf_find_section(map, PT_LOAD, _offset, NULL, _vaddr)) {
-   ERROR("failed to load the .load section from %s\n", path);
-   return -1;
+   if (elf_find_section(map, PT_INTERP, _offset, NULL, NULL) == 0) {
+   add_path_and_deps(map+interp_offset, 1, -1, 0);
}
 
-   if (elf_find_section(map, PT_DYNAMIC, _offset, _size, NULL)) {
-   ERROR("failed to load the .dynamic section from %s\n", path);
-   return -1;
+   if (elf_find_section(map, PT_LOAD, _offset, NULL, _vaddr)) {
+   DEBUG("failed to load the .load section from %s\n", path);
+   return 0;
}
 
-   if (elf_find_section(map, PT_INTERP, _offset, NULL, NULL) == 0) {
-   add_path_and_deps(map+interp_offset, 1, -1, 0);
+   if (elf_find_section(map, PT_DYNAMIC, _offset, _size, NULL)) {
+   DEBUG("failed to load the .dynamic section from %s\n", path);
+   return 0;
}
 
int clazz = map[EI_CLASS];
-- 
2.38.0


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