Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#12580 closed defect (fixed)

ppp.sh, l2tp.sh, LUCI, erroneously interprets defaultroute param

Reported by: greefon@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Attitude Adjustment 12.09 Beta
Keywords: ppp, xl2tpd, l2tp.sh, LUCI Cc:

Description

According to this default value for defaultroute is '1'. So, LUCI is just kills this option from /etc/config/network, if it is set to 'on'.

Meanwhile l2tp.sh/ppp.sh/maybeother.sh, in the absence of this parameter, consider the default value of defaultroute is 0.

It can be solved by adding line, similar to peerdns. Something like
[ "$defaultroute" = 0 ] && defaultroute="" || defaultroute="1"
besides with
[ "$peerdns" = 0 ] && peerdns="" || peerdns="1"
in l2tp.sh, ppp.sh and so on

Attachments (0)

Change History (7)

comment:1 follow-up: Changed 5 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Fixed with r34536, r34537, r34538, r34539 - thanks!

Last edited 5 years ago by jow (previous) (diff)

comment:2 in reply to: ↑ 1 Changed 5 years ago by greefon@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to jow:

Fixed with r34536, r34537, r34538, r34539 - thanks!

Oh no! You killed kenny!

I think the rejection of the possibility of change defaultroute and peerdns in /etc/config/network is a bad idea. Personaly, I use defaultroute=1 and peerdns=0 (required by my ISP).

Before the recent changes I could control the behavior of PPP/L2TP protocols in LUCI, now I have to use the console and create scripts ip-up/ip-down.

Sorry for my English

comment:3 follow-ups: Changed 5 years ago by jow

  • Resolution set to worksforme
  • Status changed from reopened to closed

You don't understand the changes. The creation of the defaultroute and setting dns servers is delegated to netifd from within /etc/ppp/ip-up. Netifd in turn will take care of setting or not setting the defaultroute and/or the dns servers depending on the defaultroute and peerdns uci options.

The controls will still work exactly as documented, the referenced changesets just removed legacy, redundant and logically wrong code.

comment:4 in reply to: ↑ 3 Changed 5 years ago by Alexander Tyrin <greefon@…>

Replying to jow:

You don't understand the changes. The creation of the defaultroute and setting dns servers is delegated to netifd from within /etc/ppp/ip-up. Netifd in turn will take care of setting or not setting the defaultroute and/or the dns servers depending on the defaultroute and peerdns uci options.

The controls will still work exactly as documented, the referenced changesets just removed legacy, redundant and logically wrong code.

Okay, I see, thanx.

comment:5 in reply to: ↑ 3 Changed 5 years ago by Alexander Tyrin <greefon@…>

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Replying to jow:

The controls will still work exactly as documented, the referenced changesets just removed legacy, redundant and logically wrong code.

Unfortunately netifd really sets the default route at the if up l2tp and adds the dns servers) if asked, but after if down previous default route is not restored, and extra DNS servers still remain in the /tmp/resolv.conf.auto. (12.09b2)

comment:6 Changed 5 years ago by nbd

  • Resolution set to fixed
  • Status changed from reopened to closed

use interface metrics to ensure that default routes can coexist and the old default route is not removed.
the issue with clearing old dns server entries has been fixed in r34664, r34665

comment:7 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.