<mangix> aparcar[m]: yep, confirmed
<will[m]> jow: what's the opposite of ((struct in_addr *)saddr)->s_addr = htobe32(nla_get_u32(addrs[CTA_IP_V4_SRC])); ?
<will[m]> i keep thinking it's be32toh(((struct in_addr *)saddr)->s_addr); but the pointers are very sad
<will[m]> oooh wait i think i got it. missing a &
<will[m]> be32toh(((struct in_addr *)&orig_daddr)->s_addr)
<mangix> isn't C lovely?
<will[m]> i'll just keep typing punctuation until it acts right
<dwfreed> do you really need the cast?
<dwfreed> also, "((struct in_addr)orig_daddr).s_addr"
<will[m]> yeah what you don't see is that it's in6_addr under the hood, which i guess is inconvenient when you're trying to do big endian swaps on ipv4 addresses. jow's code assumes in6_addr throughout which is handy except for now
<mangix> C++ version: be32toh(in_addr(orig_daddr)->s_addr)
<will[m]> dwfreed: error: conversion to non-scalar type requested; disp_daddr = be32toh(((struct in_addr)orig_daddr).s_addr);
<mangix> much more readable
<mangix> aparcar[m]: you test this with any hardware? https://github.com/openwrt/mt76/pull/552
<dwfreed> will[m]: ah, gross
<will[m]> if you want to store all your stuff as in6_addr i guess it makes some sense
sprucie has joined #openwrt-devel
dorf has joined #openwrt-devel
<aparcar[m]> mangix: I think I tried but never fully figured things out
danitool has quit [Ping timeout: 480 seconds]
dorf has quit [Remote host closed the connection]
dorf has joined #openwrt-devel
dorf has quit [Remote host closed the connection]
dorf has joined #openwrt-devel
<mangix> aparcar[m]: want a branch?
<aparcar[m]> a branch?
<mangix> a git branch
goliath has quit [Quit: SIGSEGV]
<aparcar[m]> mangix: sure hit me
valku has joined #openwrt-devel
<mangix> aparcar[m]: https://github.com/neheb/mt76
victhor has quit [Ping timeout: 480 seconds]
dorf has quit [Remote host closed the connection]
dorf has joined #openwrt-devel
dorf has quit [Remote host closed the connection]
kenny has quit [Ping timeout: 480 seconds]
<russell--> is there a reason "iw phy phy0 set antenna 0x1 0x1" results in "command failed: Not supported (-122)"?
dorf has joined #openwrt-devel
mangix has quit [Read error: Connection reset by peer]
mangix has joined #openwrt-devel
<aparcar[m]> mangix: wait so what do you want me to do?
<mangix> aparcar[m]: you said you never fully figured things out
<aparcar[m]> mangix: not sure how to use this for my device...?
<mangix> same here. my device has no wifi LED
jlsalvador2 has joined #openwrt-devel
jlsalvador has quit [Read error: Connection reset by peer]
jlsalvador2 is now known as jlsalvador
nitroshift has joined #openwrt-devel
<aparcar[m]> yea mine neither </3
<aparcar[m]> I think dangole got some
glbp has joined #openwrt-devel
valku has quit [Quit: valku]
Tapper has joined #openwrt-devel
jlsalvador has quit [Quit: jlsalvador]
<Tusker> PaulFertser: do you have much insight in configuring DSA switches in DTS ? I am getting a bit confused... I can see the phy using mdio-tools, but the kernel DTS bring up doesn't seem to like it... so obviously I'm doing something wrong, but I can't tell what :|
<PaulFertser> Tusker: I'm very new to this so can't give a specific advice too :( DTS is just a way you tell the kernel what devices are present there and what configuration you need for them on the specific hardware. So to fully understand what's going on one reads the driver source code that processes the properties in question.
jlsalvador has joined #openwrt-devel
<Tusker> yeah, it is convoluted, mixing between mdio, phy, ethernet drivers, etc... I understand what DTS is intended to do, but to get it to bring up the switch based on the information I have gathered so is becoming tough to understand how it all fits together... WatchGuard are pulling the line that they won't give GPL source code for the device because it's already EOL so they can't create a support case on it to request the GPL code :|
rua has quit [Quit: Leaving.]
rua has joined #openwrt-devel
<PaulFertser> Tusker: you can always add more debugging code to the drivers involved to see how they interpret what you put in DT. Usually you have SoC's MAC connected to the switch with RGMII and MDIO at the same time. With RGMII you could have connected a single PHY instead and with MDIO you'd control just it, but in your case instead MDIO is used to control multiple PHYs plus the switch settings (vlan
<PaulFertser> assignment, trunking etc).
<mrkiko> Connecting with an openwrt client to an openwrt ap, I get: Sat Sep 18 21:17:28 2021 daemon.notice wpa_supplicant[1432]: wlan1: Unknown event 37
<mrkiko> anyone seen it?
<mrkiko> Tusker: this is not relevant for GPL, they should provide it.
<Tusker> mrkiko: that is what I told them :)
pmelange has joined #openwrt-devel
<Tusker> PaulFertser: yeah, I am going to put in some printk spread throughout the code
dorf has quit [Remote host closed the connection]
<hauke> the results or the package feed are looking better after the libtool revert: https://downloads.openwrt.org/snapshots/faillogs/mipsel_24kc/
dorf has joined #openwrt-devel
dorf has quit [Remote host closed the connection]
dorf has joined #openwrt-devel
minimal has joined #openwrt-devel
<stintel> bah, now had even issues with a client connected to the ath9k of an AP :/
<stintel> packet loss, pings >1000ms
rua has quit [Ping timeout: 480 seconds]
rua has joined #openwrt-devel
<mangix> hauke: you mean back to normal
<mangix> the remaining failures are known
<aparcar[m]> hauke: by the way sysupgrade.openwrt.org is now online, please test it
danitool has joined #openwrt-devel
pmelange has quit [Quit: Leaving.]
<PaulFertser> aparcar[m]: looks nice. I wonder if you already have some means to auto-disable daemons from packages that are requested but currently disabled in the running system.
<aparcar[m]> PaulFertser: can you elaborate?
<PaulFertser> aparcar[m]: imagine I have currently installed stubby, dnsmasq and unbound. I switch between them back-and-forth and eventually settle on using unbound alone, so I run "/etc/init.d/dnsmasq disable" etc. If I'm requesting a new image from your service I'd probably like to have all those packages still available but also not booted, just the way they already are configured.
<aparcar[m]> PaulFertser: please see if this works for you. I don't want to hands it within the server https://github.com/aparcar/openwrt/commit/f28a3eafec0fce4260bbe01784255a82d7b45e1f
embargo has quit [Read error: Connection reset by peer]
<PaulFertser> aparcar[m]: I had something like that in mind, I didn't mean it's to be handled on the upgrade server itself. I wonder what the rationale is to not enable saving the services status by default.
embargo has joined #openwrt-devel
<karlp> I thought I saw someone provide a ptch for that a year ago or so?
victhor has joined #openwrt-devel
nitroshift has quit [Quit: Gone that way --->]
goliath has joined #openwrt-devel
pmelange has joined #openwrt-devel
<hauke> aparcar[m]: nice, it would also be nice to have a web gui where you can generate your own image over a web gui
<hauke> mangix: yes back to normal, it needs some time till all the build bot results are fine again
<hauke> we do not have many bots and they need about 1.5 days for the image and SDK builds
<hauke> and then again ~4 days to build all packages
<hauke> the current active package build still uses an old OpenWrt SDK with a broken libtool
victhor_ has joined #openwrt-devel
victhor has quit [Remote host closed the connection]
victhor_ is now known as victhor
dorf has quit [Remote host closed the connection]
dorf has joined #openwrt-devel
danitool has quit [Quit: Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos]
sprucie_ has joined #openwrt-devel
sprucie has quit [Ping timeout: 480 seconds]
kenny has joined #openwrt-devel
Tapper has quit [Ping timeout: 480 seconds]
floof58 has quit [Ping timeout: 480 seconds]
floof58 has joined #openwrt-devel
Tusker has quit [Quit: Time wasted on IRC: 2 days 8 hours 28 minutes 21 seconds]
valku has joined #openwrt-devel
dorf has quit [Remote host closed the connection]
pmelange has quit [Quit: Leaving.]
dorf has joined #openwrt-devel
<nick[m]1234> libpcap
<nick[m]1234> whups I wanted to search. sorry
kenny has quit [Quit: WeeChat 3.2.1]
<nick[m]1234> does your buildroot for openwrt21.02 still works?
jbowen has quit [Quit: leaving]
wb9688 has joined #openwrt-devel
rua has quit [Ping timeout: 480 seconds]
rua has joined #openwrt-devel
glbp has quit [Quit: leaving]
<rsalvaterra> I don't think we will skip nftables, for the time being, but…
<rsalvaterra> … God, this is fast…!
<rsalvaterra> Also, nftables performing *worse* than iptables. Cute.
<rsalvaterra> Yeah, I'll stick with fw3, tyvm.
rua has quit [Ping timeout: 480 seconds]
Tapper has joined #openwrt-devel
rua has joined #openwrt-devel
dedeckeh has quit [Remote host closed the connection]
dorf has quit [Remote host closed the connection]
dorf has joined #openwrt-devel
rua has quit [Ping timeout: 480 seconds]
rua has joined #openwrt-devel
<jow> will[m]: btw, I suggest you start using a union instead of struct in6_addr directly, this way accessing the data as either ipv4 or ipv6 becomes easier
<jow> something like union addr { struct in_addr in; struct in6_addr in6; }
<jow> then union addr myaddr = {};
<jow> and later use myaddr.in when you want to deal with it as in_addr or myaddr.in6 to treat it as in6_addr
<stintel> hmmm, https://openwrt.org/docs/guide-developer/feeds says to edit feeds.conf.default... I thought the best practice is to copy feeds.conf.default to feeds.conf and edit the latter instead?
<stintel> rsalvaterra: how does nftables perform worse? it's both netfilter under the hood so that seems unlikely?
<rsalvaterra> stintel: It seems so, unfortunately, from that presentation.
robin_ has quit [Ping timeout: 480 seconds]
<jow> I wouldn't jump to conclusions from the presentation
<jow> judging from the caption of the graph it was a test in dropping packets
<jow> entirely possible that they used XDP offloading to load an eBPF into the nic to drop inbound packets early without any conntracking etc. involved
<jow> this will of course beat any kind of netfilter-esque implementation
<jow> would also be interested in the iptables vs. nftables rule setup
<jow> was this 32 disjunct rules or one nft rule with an anonymous set of 32pkts
<jow> was conntracking inhibited etc.
<stintel> jow: I inherited some lua code that imports luci.cacheloader and luci.sgi.cgi, but I've never touched luci. is there some documentation about what these things do?
<stintel> the cacheloader seems to cause a problem, removing that import seems to fix that and everything else keeps working
<jow> I don't mean to bad-mouth these impressive performance numbers but I expect the actual real world usage performance gap to be significantly lower, even if bpfilter manages to outrun existing solutions
<stintel> just trying to understand if removing it is OK or not
<jow> stintel: so luci.sgi.cgi is basically some framework stuff that interacts with the CGI environment
<jow> stintel: is your Lua code acting as independent CGI executable or is it just some module loaded by luci?
<stintel> ahhh, there was something luci
dangole has joined #openwrt-devel
<stintel> there is some /usr/lib/lua/luci/* stuff
<jow> is there any /www/cgi-bin/ stuff?
<stintel> let me check that, probably this one file adds those imports because of that
<stintel> probably easier to just show you the code :)
<jow> shudder
<stintel> so yeah there is probably some luci stuff
<jow> why on earth do people keep calling awk from Lua
<rsalvaterra> jow: True, let's wait and see… but I honestly don't see much of a performance difference between iptables and nftables, at least for now.
<stintel> jow: :D
<stintel> jow: yeah this code is not great
<stintel> what would be your preferred solution to replace that awk /proc/net/arp ?
<stintel> I was thinking calling ip neigh
<stintel> but not sure
<stintel> I'm new at this :)
<jow> In german I'd call that Schlumpfcode
<jow> must be one of the least efficient ways to mac an IP address to a mac
<jow> *map
Lynx- has joined #openwrt-devel
<stintel> unfortunately there's no ubus call to ask dnsmasq
<jow> pm
<Lynx-> dangole in terms of getting back to vendor on RT3200, I followed steps but get: Could not open mtd device: /dev/mtd0
<Habbie> new ubus features pop up as patches on the dnsmasq list all the time btw
<dangole> Lynx-: you need to install mtd-rw package or patch DTS to remove 'read-only'
<Lynx-> :)
<dangole> Lynx-: otherwise you won't be able to write to that area in the flash for safety reasons
<Lynx-> btw my boot_backup only has 0 1 and 2 not 3, is that normal? I only need to write 0 1 and 2?
<dangole> yes, you only need to write mtd{0,1,2}. that's enough for the vendor bootloader to start and allow you installing the stock rom via TFTP
<dangole> for that it's best to have serial console connected, I actually never tried without
<dangole> (ie. I **guess** that absence of any usable image in flash triggers TFTP when using the stock loader, or holding one of the buttons may, but I never tried)
<Lynx-> will let you know
<Lynx-> Configuring kmod-mtd-rw.
<Lynx-> Collected errors:
<Lynx-> * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.64-1-6c1889bac5024893a9a66c4b6f7b4252) for kmod-mtd-rw
<dangole> Lynx-: opkg install auc ; auc
<dangole> Lynx-: that will allow update to current snapshot and allow you to install mtd-rw
<Lynx-> this should be not in recovery mode
<dangole> Lynx-: best is to do this in recovery, but you'd have to build it yourself (e.g. using my installer script) and add mtd-rw to the image.
<dangole> Lynx-: but should work just as fine while running production image which can be updated using 'auc' and then you can install 'mtd-rw'
<Lynx-> and then reboot to recovery to do the write mtd?
<Slimey> i guess every rose has its thorn after all
<dangole> Lynx-: no. either you build your own recovery image which already contains mtd-rw, and then use recovery to write back the stock bootchain. or use production image, update it using auc, install mtd-rw and then use that to write as well (no reboot required in that casE)
dorf_ has joined #openwrt-devel
<Lynx-> ah cool
<Lynx-> so steps are basically a) flash non-ubi; b) auc; c) grab the backup mtd0 from the boot to /tmp; d)unmount/detach ubi; e) write mtd
<dangole> Lynx-: are you planning to go back to stock firmware to re-sell the device? just wondering why anyone would want to go back...
<Lynx-> exactly
<Lynx-> have 3 more
<Lynx-> love them
goliath has quit [Quit: SIGSEGV]
<Lynx-> so this one is to be made fresh again
<Lynx-> are my steps above correct?
dorf has quit [Remote host closed the connection]
<dangole> Lynx-: no exactly: no flashing of non-ubi, that will ruin things earlier than you'd want... just in regular UBI production firmare use auc to update it, then install mtd-rw, then write from boot-backup to mtdrw{0,1,2} which doesn't overlap with UBI area, so no need to detach or anything
<Lynx-> oh, shit
<dangole> Lynx-: no biggie if it already happened, it will "just" destroy everything and then you have to use TFTP to load recovery, and then use that to sysupgrade production...
<dangole> Lynx-: up to the moment you install 'mtd-rw' and make use of it you shouldn't be able to brick the device...
<Lynx-> that's curious because I did that and it booted fine?
<Lynx-> openwrt-mediatek-mt7622-linksys_e8450-squashfs-sysupgrade
<dangole> yes it will boot fine. but it will destroy UBI and hence you will realize on the next reboot that things no longer work...
<Lynx-> ahh
<Lynx-> whilst it is booted can I flash again?
<dangole> that won't help
<Lynx-> back to UBI
<Lynx-> ah
<dangole> no, because the non-UBI firmware doesn't know anything about UBI and how to initialize or write it
<Lynx-> so now I reboot, then TFTP to load recovery
<Lynx-> etc
<dangole> just reboot and prepare to feed *initramfs-recovery.itb via TFTP
<dangole> yes, exactly
<Lynx-> "As the total size of the flash chip is only 128MiB, 150MiB certainly has some overlap. You have to use the initramfs image of the non-UBI firmware to have the same MTD partitioning which matches your backup files.
<dangole> Lynx-: that was someone who made the backups manually before flashing UBI, so his files corresponded to the stock partition layout and hence difficult to write back with the UBI firmware...
<Lynx-> ahh I too made my own backups could I use those in this present state?
<Lynx-> I have mtd0, 1, 2 and 3
<Lynx-> ah, but I guess I have no mtdwrite so no
<Lynx-> unless, is there a way I can force mtd write without auc?
<owrt-1907-builds> Build [#23](https://buildbot.openwrt.org/openwrt-19.07/images/#builders/16/builds/23) of `armvirt/32` failed.
<Lynx-> dangole I have -rwxrwxrwx 1 lynx lynx 125M Sep 3 19:52 OpenWrt.mtd3.bin (from factory)
<owrt-1907-builds> Build [#24](https://buildbot.openwrt.org/openwrt-19.07/images/#builders/53/builds/24) of `mediatek/mt7623` failed.
<Lynx-> (and the mtd0 (512kb), 1 (1280KB) 2 (128KB)
<owrt-snap-builds> Build [#283](https://buildbot.openwrt.org/master/images/#builders/35/builds/283) of `mvebu/cortexa72` failed.
<Lynx-> so can I write those whilst in this non-UBI version, prior to the reboot that will fail?
pmelange has joined #openwrt-devel
<owrt-snap-builds> Build [#322](https://buildbot.openwrt.org/master/images/#builders/5/builds/322) of `mxs/generic` failed.
<owrt-snap-builds> Build [#283](https://buildbot.openwrt.org/master/images/#builders/57/builds/283) of `octeon/generic` failed.
<owrt-snap-builds> Build [#333](https://buildbot.openwrt.org/master/images/#builders/2/builds/333) of `layerscape/armv7` failed.
<dangole> Lynx-: yes that you be fine, but you also need mtd-rw to remove the read-only attribute used to protect you from yourself ;)
Lynx- has quit [Ping timeout: 480 seconds]
Lynx- has joined #openwrt-devel
Lynx-- has joined #openwrt-devel
Lynx-- has quit [Read error: Connection reset by peer]
Lynx-- has joined #openwrt-devel
Lynx-- has quit [Read error: Connection reset by peer]
Lynx-- has joined #openwrt-devel
goliath has joined #openwrt-devel
Lynx- has quit [Ping timeout: 480 seconds]
Lynx-- is now known as Lynx-
<owrt-1907-builds> Build [#24](https://buildbot.openwrt.org/openwrt-19.07/images/#builders/46/builds/24) of `archs38/generic` failed.
Lynx-- has joined #openwrt-devel
<Lynx--> dangole ok I'm stuck - I can successfully use TFTP to provide openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb - it seems to work... then the device boots up, the I try to sysupgrade -v openwrt-mediatek-mt7622-linksys_e8450-squashfs-sysupgrade.bin <-- but then I get not compatible
<owrt-1907-builds> Build [#22](https://buildbot.openwrt.org/openwrt-19.07/images/#builders/70/builds/22) of `ipq806x/generic` failed.
<Lynx--> root@OpenWrt:~# sysupgrade -v /tmp/openwrt-mediatek-mt7622-linksys_e8450-squashfs-sysupgrade.bin -F
<Lynx--> Fri Sep 24 18:33:46 UTC 2021 upgrade: Device linksys,e8450-ubi not supported by this image
Lynx- has quit [Ping timeout: 480 seconds]
Lynx-- is now known as Lynx-
<Lynx-> now when I reboot the router I always see this initial 'orange light'
<Lynx-> (and
<Lynx-> OpenWrt SNAPSHOT r17443-90e167abaa)
<Lynx-> just trying to follow this: https://forum.openwrt.org/t/belkin-rt3200-linksys-e8450-wifi-ax-discussion/94302/31?u=lynx <-- step 4 is with 'sysupgrade -v /tmp/openwrt-mediatek-mt7622-linksys_e8450-squashfs-sysupgrade.bin -F' or not?
Lynx-- has joined #openwrt-devel
Lynx--_ has joined #openwrt-devel
Lynx--_ has quit [Read error: Connection reset by peer]
Lynx--_ has joined #openwrt-devel
Lynx- has quit [Ping timeout: 480 seconds]
Lynx--_ is now known as Lynx-
Lynx--_ has joined #openwrt-devel
* Lynx--_ argh
Lynx-- has quit [Ping timeout: 480 seconds]
<Lynx--_> dangole I am so sorry to bother you with this. What am I missing? I can TFTP fine, but the next steps always fail. My router always boots with files in /sys/fs/pstore/
<Lynx--_> seems like I am stuck in recovery mode with every boot
Tapper has quit [Ping timeout: 480 seconds]
Lynx- has quit [Ping timeout: 480 seconds]
Lynx--_ is now known as Lynx-
Lynx-4g has joined #openwrt-devel
<aparcar[m]> what's up with these git-very issues?
Lynx-- has joined #openwrt-devel
Lynx-- has quit [Read error: No route to host]
Tapper has joined #openwrt-devel
Lynx- has quit [Ping timeout: 480 seconds]
<stintel> ?
Lynx-4g has quit [Remote host closed the connection]
<zorun> aparcar[m]: hi, it always happen to me for the first build of a fresh builder
<zorun> never understood why
<aparcar[m]> zorun: Oh ok
danitool has joined #openwrt-devel
Borromini has joined #openwrt-devel
<dangole> Lynx: sorry i had dinner in the meantime...
goliath has quit [Quit: SIGSEGV]
<aparcar[m]> dangole: good evening
minimal has quit []
Borromini has quit [Quit: Lost terminal]
goliath has joined #openwrt-devel
<owrt-1907-builds> Build [#22](https://buildbot.openwrt.org/openwrt-19.07/images/#builders/52/builds/22) of `samsung/s5pv210` completed successfully.
<mrkiko> dangole: hi!
pmelange has quit [Quit: Leaving.]
<owrt-1907-builds> Build [#23](https://buildbot.openwrt.org/openwrt-19.07/images/#builders/13/builds/23) of `rb532/generic` completed successfully.
rua has quit [Ping timeout: 480 seconds]
rua has joined #openwrt-devel
philipp64|work has quit [Quit: philipp64|work]
dorf_ has quit [Remote host closed the connection]
dorf_ has joined #openwrt-devel
cp- has quit [Remote host closed the connection]
rua has quit [Ping timeout: 480 seconds]
philipp64|work has joined #openwrt-devel
philipp64|work has quit []
philipp64|work has joined #openwrt-devel
rua has joined #openwrt-devel
philipp64|work has quit []
dangole has quit [Remote host closed the connection]
dangole has joined #openwrt-devel
dangole has quit [Ping timeout: 480 seconds]
dorf_ has quit [Remote host closed the connection]
dorf has joined #openwrt-devel
philipp64 has joined #openwrt-devel
<philipp64> dumb question... is openwrt-r17111+419-af56075a8f-ath79-generic-tplink_archer-a7-v5-initramfs-kernel.bin the sysupgrade file on an Archer? I don't mess with ath79 hardware very often... Or is it called something else? Because that's all I'm seeing in bin/targets/ath79/generic ...
<philipp64> Okay, saw this https://openwrt.org/faq/what_is_the_difference_between_the_different_image_formats -- but it doesn't say what I need to turn on to make a squash fs image I burn...