[Development] Qt5 Bearer: broken PPP support

Alexander Smirnov asmirnov at ilbers.de
Tue Sep 20 21:48:42 CEST 2016


Dear all,

I've faced with the following problem. I use the Linux-based board, in 
which I start PPP daemon to have GPRS networking. After upgrading from 
Qt5.4 to Qt5.6 my ppp0 interface is always in 
QNetworkConfiguration::Defined state, so it's unusable.

After debugging I figured out, that the problem is in commit:

   043f5d3eb52587831f643bc52c95079c36d984c7

This commit allows to add to list:

   QList<QNetworkInterfacePrivate *> interfaces;

interfaces with no address field (ifa_addr == NULL).

Then, I've checked the output from 'getifaddrs()' syscall on my board, 
and it returns 2! instances of ppp0:

  - one with AF_INET family
  - one with ifa_addr == NULL

So, with the commit mentioned above, there are 2 ppp0 interfaces now in 
the list, one - correct, second - incorrect.

Due to this mix, eventually in

   QGenericEngine::doRequestUpdate()

ppp0 is always set to QNetworkConfiguration::Defined, because:

   interface.addressEntries().isEmpty()


Reverting the patch helps to get ppp0 in QNetworkConfiguration::Active 
state.

So, is it a bug? :-)

-- 
With best regards,
Alexander Smirnov

ilbers GmbH
Baierbrunner Str. 28c
D-81379 München
+49 (89) 122 67 24-0
http://ilbers.de/
Commercial register Munich, HRB 214197
General manager: Baurzhan Ismagulov



More information about the Development mailing list