Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 659430 - something[sic dhcpcd] is creating a useless default route on wwan device
Summary: something[sic dhcpcd] is creating a useless default route on wwan device
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-27 19:51 UTC by Robert Forsman
Modified: 2018-09-24 17:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output of emerge --info (emerge.info,5.72 KB, application/x-info)
2018-06-27 19:51 UTC, Robert Forsman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Forsman 2018-06-27 19:51:54 UTC
Created attachment 537484 [details]
output of emerge --info

I have a Huawei webConnect Jet USB stick that lets me connect to the internet via cellular data connection.  After a recent software upgrade the device now creates a useless default route on the wwan interface that interferes with the PPP interface (ppp has been working for the past several years on a couple of laptops).

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     204    0        0 wwp0s20f0u4i1
0.0.0.0         10.64.64.66     0.0.0.0         UG    4005   0        0 ppp2
10.64.64.66     0.0.0.0         255.255.255.255 UH    0      0        0 ppp2
169.254.0.0     0.0.0.0         255.255.0.0     U     204    0        0 wwp0s20f0u4i1

In order to access the internet I have to issue a

route del default dev wwp0s20f0u4i1

to get rid of the bogus route and let packets flow through the ppp2 interface correctly.

How do I prevent this useless route from being created?  I don't even know which subsystem/software is creating this route.

While it might not be relevant to this issue: This device does require usb_modeswitch to convert it from a storage device into a "serial" modem and make the /dev/ttyUSB[0-2] appear.


Linux herakleion 4.12.12-bob #38 SMP Sat Dec 9 23:32:34 EST 2017 x86_64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz GenuineIntel GNU/Linux
Comment 1 Jonas Stein gentoo-dev 2018-06-30 20:36:14 UTC
It is sad to read that you have problems with the software. The situation seems to be a bit more complicate and requires some analysis.
We can not help you efficiently via bug tracker. The bug tracker aims rather on specific problems in .ebuilds and less on individual systems. 

I have had very good experience on the gentoo IRC [1] with questions like this. Of course there are also forums and mailing lists [2,3].
I hope you understand, that I will close the bug here therefore and wish you good luck on one of the mentioned channels [4].
Please reopen the ticket in order to provide an indication for an specific error in an ebuild or any gentoo related product.

[1] https://www.gentoo.org/get-involved/irc-channels/
[2] https://forums.gentoo.org/
[3] https://www.gentoo.org/get-involved/mailing-lists/all-lists.html
[4] https://www.gentoo.org/support/
Comment 2 Robert Forsman 2018-09-24 17:56:10 UTC
After some help from IRC I found a "solution" to this problem.

The useless route was being created by dhcpcd.  Adding 

denyinterfaces wwp*

to /etc/dhcpcd.conf prevents dhcpcd from creating the route (and prevents it from giving a link-local address to the device).  There are a couple of things that combined to cause this problem:

kernel upgrade included a driver that created the wwp0s20f0u4i1 interface.  This interface seems useless (dhcpcd can't get an IP address), and the only way I've been able to use the device is the PPP script I've been using for years and years that connects over the /dev/ttyUSB0 device.  It might be a flaw in the driver that the wwp* interface is being created for this device.

The metric on the route created by dhcpcd was 204 (or something in the low 200s) for a link-local address.  The metric on the route created by pppd was 4005.  I'm not sure these are appropriate default values, given that the result is that a link-local device ends up with higher priority than an actual working ppp connection.  There might be counterexamples that justify those numbers in situations other than mine.