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

Host-Uniq field in PPPoE connection #1730

Closed
wants to merge 1 commit into from
Closed

Host-Uniq field in PPPoE connection #1730

wants to merge 1 commit into from

Conversation

pvelati
Copy link
Contributor

@pvelati pvelati commented Jul 19, 2017

Add a custom field in the "advanced configuration" tab in pppoe connection page.
The custom field "host-uniq" is needed in order to connect with some ISP (for example Vodafone fiber in Italy).

Thread on forum: https://forum.opnsense.org/index.php?topic=5307.0

host-uniq1

@pvelati pvelati changed the title Host-Uniq field in PPPoE connection, Host-Uniq field in PPPoE connection Jul 19, 2017
@fichtner fichtner self-assigned this Jul 19, 2017
@fichtner fichtner added the feature Adding new functionality label Jul 19, 2017
@fichtner fichtner added this to the 17.7 milestone Jul 19, 2017
@fichtner
Copy link
Member

Hi Paolo,

Thanks for this. I have one question: are you sure this only applies to PPPoE? That's what the config file code assumes at the moment.

Cheers,
Franco

@pvelati
Copy link
Contributor Author

pvelati commented Jul 19, 2017

Hi Franco,
I don't know if you can use the custom tag for other type of connection, I can't find documentation regarding the usage of this tag outside a pppoe connection.

I have noticed that this field also appears in PPP, PPTP, L2TP connection. Maybe I should hide it if it's not pppoe.

Paolo

@fichtner
Copy link
Member

ok let's instead keep it for all, if empty it does not cause issues anyway :) just need to move the config write block a tiny bit. I'll take care of it.

@fichtner
Copy link
Member

alright...upon further research, it looks like a pppoe-only thing

@fichtner fichtner closed this in 7681a29 Jul 19, 2017
@fichtner
Copy link
Member

I had to change a few things, I hope you don't mind. interfaces.php also needed the GUI change.

Can you test with:

# opnsense-revert opnsense
# opnsense-patch 7681a29

Cheers.
Franco

@fichtner
Copy link
Member

Super, let's get this into 17.7 right away then. 😊

@pvelati
Copy link
Contributor Author

pvelati commented Jul 20, 2017

Sorry I haven't fully tested the patch correctly. It needs more tweaks, I'll try better tomorrow evening and I'll post results.

@fichtner
Copy link
Member

Your patch posted originally, or the one that I merged?

@pvelati
Copy link
Contributor Author

pvelati commented Jul 20, 2017

Both.
Line 1586 in interfaces.inc should be:
$mpdconf_arr[] = "set service "{$ppp['hostuniq']}|"";
because is not "set host-uniq STRING" but "set service "string|"" (with the "" and the | inside it)

and it's assumed that is the binary version of you host-uniq

In this way I can get IP from ISP, but I can't navigate pages (I think is a problem with my net conf).
Sorry for the typo in the conf.

fichtner added a commit that referenced this pull request Jul 20, 2017
@fichtner
Copy link
Member

Ah, ok, try this then:

# opnsense-revert opnsense
# opnsense-patch 7681a29 ac40e52

fichtner added a commit that referenced this pull request Jul 20, 2017
(cherry picked from commit ac40e52)
@pvelati
Copy link
Contributor Author

pvelati commented Jul 20, 2017

Ok, I tried now and after reading the documentation of ng_pppoe it works (now I'm connected with it).
From the docs I read that the host-uniq tag is placed in "set pppoe service" attribute.
So: set pppoe service "0xHOSTUNIQ|SERVICENAME"
e.g. my conf for host-uniq is: set pppoe service "0x577635332630543030313631393531|"
The "0x" before and the "|"(pipe) after are are absolutely necessary.

I don't know if you prefer using only the "Service Name" field on the webGUI or you prefer make a code that merges the two values in a single string.

Thank you 👍 I think all the people in Italy that wanted to get rid of the VodafoneStation router will be pleased.

fichtner pushed a commit that referenced this pull request Jul 23, 2017
fixed command in pppoe configuration, connected to pull request #1730 #1730
fichtner pushed a commit that referenced this pull request Jul 23, 2017
fixed command in pppoe configuration, connected to pull request #1730 #1730

(cherry picked from commit c909149)
(cherry picked from commit 0d9e0ba)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

Successfully merging this pull request may close these issues.

2 participants