Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3677 - LCP terminated by peer after IPv6 interface config failure #6987

Open
openwrt-bot opened this issue Mar 10, 2021 · 2 comments
Open
Labels

Comments

@openwrt-bot
Copy link

johnfzc:

I have built a custom kernel firmware image for a low memory device (TP-Link TL-WR842N/ND v2) from the current snapshot. As part of my efforts to free memory space I removed IPv6 support from the kernel.

When I connect to the mobile network I receive an IP address and, immediately after, a "LCP terminated by peer" message.

Tue Mar 9 05:17:51 2021 daemon.notice pppd[6962]: Connect: 3g-wan <--> /dev/ttyACM0
Tue Mar 9 05:17:55 2021 daemon.err pppd[6962]: IPv6 socket creation failed: Address family not supported by protocol
Tue Mar 9 05:17:55 2021 daemon.err pppd[6962]: IPv6 socket creation failed: Address family not supported by protocol
Tue Mar 9 05:17:55 2021 daemon.notice pppd[6962]: local IP address x.x.x.146
Tue Mar 9 05:17:55 2021 daemon.notice pppd[6962]: remote IP address x.x.x.146
Tue Mar 9 05:17:55 2021 daemon.notice pppd[6962]: primary DNS address 8.8.8.8
Tue Mar 9 05:17:55 2021 daemon.notice pppd[6962]: secondary DNS address 8.8.4.4
Tue Mar 9 05:17:55 2021 daemon.info pppd[6962]: LCP terminated by peer
Tue Mar 9 05:17:55 2021 daemon.info pppd[6962]: Connect time 0.0 minutes.

I enabled debug messages for ppp and saw what I believe is the cause of the issue, because of the failed configuration of the IPv6 interfaces we send a interface configuration failure message to the peer:

Tue Mar 9 05:14:09 2021 daemon.debug pppd[6524]: sent [IPV6CP TermReq id=0x2 "Interface configuration failed"]

Shortly thereafter, and quite logically, we receive a termination request from the peer.

Tue Mar 9 05:14:09 2021 daemon.debug pppd[6524]: rcvd [LCP TermReq id=0x3]

I have a few questions about this issue:

  • Is there a way for me to work around this issue in config and allow the router to connect using only IPv4
  • Is there a way to change this behaviour by default, so that if you don't have IPv6 support in your build of OpenWrt PPP doesn't attempt to use IPv6
  • Is there a way to improve the quality of the log messages, if we're sending a termination message to the peer this should probably be reported even when not in debug mode. This is probably more of an upstream issue in pppd itself.
@openwrt-bot
Copy link
Author

johnfzc:

I've determined that you can work around this problem; if you add "noipv6" as a new line in the /etc/ppp/options file the client won't attempt to request an IPv6 address and terminate the connection when it cannot assign it.

@openwrt-bot
Copy link
Author

mkresin:

I don't really see an issue here. IPv6 is requested by default for PPP links and can be disabled in /etc/config/network:

config interface 'wan' option ifname 'eth0.1' option proto 'pppoe' option username 'username' option password 'password' option ipv6 '0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant