openwrt / openwrt/packages

rr-pppoe-server startup script issues

Open
#26,616 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Hello, I think this is the correct place for this, but please close the issue and send me to appropriate repo if it's not.

I have found several bugs that involve the startup script for the rr-pppoe-server package.

The file in question is the /etc/init.d/pppoe-server script.

  1. Obvious typo on line 51
	[ -n "$firstremoteip" ] && append OPTIONS "-R $firstremoteip"
	[ -n "maxsessions" ] && append OPTIONS "-N $maxsessions" # <-- the test is missing the $ variable
	[ -n "optionsfile" ] && append OPTIONS "-O $optionsfile" # <-- same here
	[ "$randomsession" = "1" ] && append OPTIONS "-r"
  1. behaviour mismatch with luci-app-rp-pppoe-server: the UI removes the randomsession value from the /etc/config/pppoe file when the randomize sessions checkbox is unchecked. However, the default value of missing attribute in the startup script is 1, meaning that it's effectively not possible to not randomize.

line 30

	config_get_bool randomsession "$cfg" randomsession 1

To aggravate this matter (only a bit), the attribute value that the app uses is randomsessions (plural).

  1. the final bug which is UI related is that the dropdown for interface lists devices as well as interfaces. As a result, this line will silently fail the entire script if a device is selected instead of an interface.
  2. while we're at it, I think a call to logger -t pppoe-server should be added in the startup script for hygiene.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with net/rp-pppoe/files/pppoe-server.init, especially the config reads around lines 30 and 51 and the interface handling around line 42. Compare those settings and failure behavior with luci-app-rp-pppoe-server; done means the reported script and UI mismatches are resolved and startup logging is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
frontend, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.