Conversation
…rom CIDR ranges in IP pool, fix for removing shaper by RADIUS COA and enhancements for L2TP sessions for per client secrets and tiny performance improvements
laarmen
reviewed
Jun 18, 2020
| p1 = strstr(ptr, ",l2tp_secret"); | ||
| if (p1) { | ||
| l2tp_secret=opt->val; | ||
| *p1 = '\0'; |
Contributor
There was a problem hiding this comment.
Hi,
Would it be possible not to mutate the input string here? It might be a bit more difficult as the u_parse_endstr bit would need to be tweaked, but that would allow for a more robust and intuitive code : opt is clearly an input argument, and one does not expect its content to be changed by a function called parse_iprange.
Author
There was a problem hiding this comment.
I think that's good feedback. One simple way to do it would just to temporarily strdup() the contents. Would that be sufficient?
|
Dear @lbjw, Can you open a PR at "good" place: Thanks in advance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhance CLI:
(a) configurable banner and prompt
(b) show MTU and MPPE status in 'show sessions'
(c) a show version function
Fix ip pool to leave out network and broadcast number from CIDR range in pool
Enhance L2TP code:
(a) Pass calling-station-id and called-station-id from L2TP if supplied
(b) Per-client L2TP secrets
(c) Move client check from every single UDP packet to just L2TP session creation to improve performance
Fix RADIUS COA removal of shaper with patch from xebd from forum.