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

Only IPv6 and no IPv4 in Map #94

Open
wolf128058 opened this issue Oct 2, 2020 · 1 comment
Open

Only IPv6 and no IPv4 in Map #94

wolf128058 opened this issue Oct 2, 2020 · 1 comment

Comments

@wolf128058
Copy link

ip -6 address show dev br-freifunk 2> /dev/null | grep -v "$prefix" | tr '/' ' ' | awk 'BEGIN{i=0} /inet/ { if($2 !~ /^fe80/) { printf("%s\"%s\"", (i ? ", " : ""), $2); i=1; }}'

... this way we only get the IPv6-Adresses in our map.

https://github.com/DEvil0000/ansible-pi4-ffoffloader/blob/577d1f0452078a71b77f34c884490e51a34c3b53/roles/alfred-install/templates/print_map.sh.j2#L82 shows an alternative print_all()-Function that is able to publishthe IPv4-adress, too.

⚠ Take care: This one is a template and has some ansible-vars in it.

@wolf128058
Copy link
Author

"Sind wir nicht alle ein bisschen 10.15.239.127?"
Btw: Some times I only get this IPv4 on purpose. I think this one would be "ignoreable" in this script.
But some Routers especially offloaders still get real IPv4-Adresses that would be still nice to know (imho)

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

No branches or pull requests

1 participant