Various Libsoup Issues
EDIT: There are a few issues exposed here, so I am listing them out:
- (fixed with cd5f5fcd ) "unable to set proxy" error, started with the recent commit that replaced gweb/gresolve with libsoup
- (fixed with 31a2f175 ) Resolve_host() crashing if there are no ipv6 nameservers
- (Fixed with f3062393 ) Resolve_host() should not attempt to resolve MMS send/receieve requests if there is a proxy active
- (Fixed with b3f3d40f ) Bind all SoupMessages to service->interface
Original Bug Report: "unable to set proxy" error, started with the recent commit that replaced gweb/gresolve with libsoup
Summary
I have been using mmsd to receive MMS on the Librem 5, it used to work but now it no longer worked for the current master branch. There is now an "unable to set proxy" error, and I bisected to find out when this problem started and it turned out to be at the commit e6361ccc.
Steps to reproduce
This is on a Librem 5 running PureOS byzantium.
My ~/.mms/modemmanager/mms file contains the following:
[Modem Manager]
CarrierMMSC=http://mmsc.tele2.se
MMS_APN=4g.tele2.se
CarrierMMSProxy=130.244.202.30:8080
DefaultModemNumber=NULL
AutoProcessOnConnection=true
AutoProcessSMSWAP=false
[Settings]
UseDeliveryReports=false
TotalMaxAttachmentSize=1100000
MaxAttachments=25
AutoCreateSMIL=false
where I suppose the CarrierMMSProxy=130.244.202.30:8080
line is most relevant for this issue.
The issue happens every time mmsd starts, for example every time I reboot the phone.
What is the current bug behavior?
There is an error message saying unable to set proxy: 130.244.202.30:8080
.
Here is part of the journalctl output leading up to that error message:
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../src/service.c:activate_bearer() service 0xaaaae6046160 setup 0 active 0
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../src/service.c:activate_bearer() service 0xaaaae6046160 waiting for 20 seconds
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../plugins/modemmanager.c:set_context() Setting Context...
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../src/service.c:mms_service_set_mmsc() service 0xaaaae6046160 mmsc http://mmsc.tele2.se
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../plugins/modemmanager.c:set_context() Max number of bearers: 1
May 16 13:24:10 pureos mmsd-tng[612]: ../src/service.c:activate_bearer() service 0xaaaae6046160 setup 0 active 0
May 16 13:24:10 pureos mmsd-tng[612]: ../src/service.c:activate_bearer() service 0xaaaae6046160 waiting for 20 seconds
May 16 13:24:10 pureos mmsd-tng[612]: ../plugins/modemmanager.c:set_context() Setting Context...
May 16 13:24:10 pureos mmsd-tng[612]: ../src/service.c:mms_service_set_mmsc() service 0xaaaae6046160 mmsc http://mmsc.tele2.se
May 16 13:24:10 pureos mmsd-tng[612]: ../plugins/modemmanager.c:set_context() Max number of bearers: 1
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../plugins/modemmanager.c:set_context() Current Context APN: 4g.tele2.se, mmsd-tng settings MMS APN: 4g.tele2.se
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../plugins/modemmanager.c:set_context() You are connected to the correct APN! Enabling context...
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../plugins/modemmanager.c:bearer_handler() At Bearer Handler: path /org/freedesktop/ModemManager1/Modem/0 active 1 context_active 1
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../plugins/modemmanager.c:bearer_handler() active and context_active, bearer_notify
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../src/service.c:mms_service_bearer_notify() service=0xaaaae6046160 active=1 iface=wwan0 proxy=130.244.202.30:8080
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: ../src/service.c:mms_service_bearer_notify() interface wwan0 proxy 130.244.202.30:8080
May 16 13:24:10 pureos mmsd-tng[612]: ../plugins/modemmanager.c:set_context() Current Context APN: 4g.tele2.se, mmsd-tng settings MMS APN: 4g.tele2.se
May 16 13:24:10 pureos mmsdtng[612]: mmsd-tng[612]: unable to set proxy: 130.244.202.30:8080
Then it does not fetch the mms like it should, I suppose that is an effect of the "unable to set proxy" problem.
What is the expected correct behavior?
Earlier, when things worked, there was no "unable to set proxy" error message and MMS messages were fetched and ended up in the ~/mms directory.
Possible fixes
I can get it to work by checking out an earlier version of the code, for example the commit 8c7b43fb works as well as 02c21dae and 3416f871. The problem started with e6361ccc and any later version of the code seems to have this problem.