Skip to content

Use "ip addr replace" instead of "add" for static IPs#195

Open
albertvaka wants to merge 1 commit intojoukewitteveen:masterfrom
albertvaka:albertvaka/ip-addr-replace
Open

Use "ip addr replace" instead of "add" for static IPs#195
albertvaka wants to merge 1 commit intojoukewitteveen:masterfrom
albertvaka:albertvaka/ip-addr-replace

Conversation

@albertvaka
Copy link
Copy Markdown

This doesn't fail if the address is already assigned.

BUG: #192

This doesn't fail if the address is already assigned.
@albertvaka
Copy link
Copy Markdown
Author

Of the 3 PRs I opened today this is probably the most important, in case your bandwidth is limited and it helps priorization :)

@joukewitteveen
Copy link
Copy Markdown
Owner

This goes against one of the core netctl principles, namely to fail on everything unexpected. Network configurations can be tricky and connecting successfully with an incorrectly configured machine is a recipe for trouble. In the case of #192, could it be the case that netctl fails to clean up properly when it first disconnects?

@albertvaka
Copy link
Copy Markdown
Author

I'm not sure how much of a cleanup netctl tries to do when it disconnects, but definitely it's not removing the IP. If it did, the probably this change wouldn't be needed, indeed.

@joukewitteveen
Copy link
Copy Markdown
Owner

Going by the code, I think it should remove the addresses:
https://github.com/joukewitteveen/netctl/blob/1.29/src/lib/ip#L171-L185
Are you saying this doesn't work?

@albertvaka
Copy link
Copy Markdown
Author

This doesn't call ip_unset():

systemctl restart netctl-auto@wlan0.service 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants