-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
add subnet mask to interface address #332
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this pull request! Be sure to follow the pull request template!
I am a bot, here is the pushed image/manifest for this PR:
|
I am a bot, here is the pushed image/manifest for this PR:
|
I am a bot, here is the pushed image/manifest for this PR:
|
I am a bot, here is the pushed image/manifest for this PR:
|
An immediate concern I can see with this is that applying it to an existing install would result in duplicate IP addresses being allocated as f/ex |
PROPOSED_IP="${INTERFACE}.${idx}/32" | ||
if ! grep -q -R "${PROPOSED_IP}" /config/peer*/*.conf 2>/dev/null && ([[ -z "${ORIG_INTERFACE}" ]] || ! grep -q -R "${ORIG_INTERFACE}.${idx}/32" /config/peer*/*.conf 2>/dev/null); then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thespad, is something like this going to be better? If not, do you have any suggestions?
PROPOSED_IP="${INTERFACE}.${idx}/32" | |
if ! grep -q -R "${PROPOSED_IP}" /config/peer*/*.conf 2>/dev/null && ([[ -z "${ORIG_INTERFACE}" ]] || ! grep -q -R "${ORIG_INTERFACE}.${idx}/32" /config/peer*/*.conf 2>/dev/null); then | |
for idx in {2..254}; do | |
PROPOSED_IP="${INTERFACE}.${idx}/32" | |
if ! grep -q -R "${INTERFACE}.${idx}" /config/peer*/*.conf 2>/dev/null && | |
! grep -q -R "${INTERFACE}.${idx}/32" /config/peer*/*.conf 2>/dev/null && | |
([[ -z "${ORIG_INTERFACE}" ]] || | |
(! grep -q -R "${ORIG_INTERFACE}.${idx}" /config/peer*/*.conf 2>/dev/null && | |
! grep -q -R "${ORIG_INTERFACE}.${idx}/32" /config/peer*/*.conf 2>/dev/null)); then | |
CLIENT_IP="${PROPOSED_IP}" | |
break | |
fi | |
done |
I am a bot, here is the pushed image/manifest for this PR:
|
This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request is locked due to inactivity |
fixes #330