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

Initial support for creating interfaces through "ip link" from iproute2 #24

Merged
merged 2 commits into from Jun 9, 2017
Merged

Initial support for creating interfaces through "ip link" from iproute2 #24

merged 2 commits into from Jun 9, 2017

Conversation

Pinkbyte
Copy link
Member

TL;DR - tiny rework of simple patch[1], that somehow is not included in netifrc yet
Works like a charm and remove burden of messing with preup() and postdown()
Unfortunately, there is not easy way to determine if this link interface was created manually from iproute2 or given by system itself(it is easy with tunnels though as it's separate command), so, as a precaution, only "tested" tunnels were added for now(gretap and vxlan)

[1] - https://gist.github.com/josephglanville/2757336

Copy link
Contributor

@robbat2 robbat2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweak otherwise looks good; could you look at the current TODO file, and see how many of those interface types can be implemented with this code? I think almost all of them.

eval link=\$iplink_${IFVAR}
if [ -n "${link}" ]; then
local ipproto=''
[ "${tunnel##mode ip6gre}" != "${tunnel}" ] && ipproto='-6'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using a case statement here instead of the multiple if conditions?

case $tunnel in
  *mode\ ip6*) ipproto='-6' ;;
esac

@robbat2 robbat2 merged commit 0cdda1e into gentoo:master Jun 9, 2017
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Nov 27, 2017
New functionality & improvements:
- Wireless: 'iw' module to replace older 'iwconfig' module.
  (Brian Evans <grknight@gentoo.org>)
- iproute2: VXLAN & GRETAP support (iplink_$IFVAR)
  (Sergey Popov <pinkbyte@gentoo.org>)
- Bonding: ARP IP targets (Marc Schiffbauer <mschiff@gentoo.org>)
- wpa_supplicant: better matching of wired connections
  (Henning Schild <henning@hennsch.de>)
- IPv6: clearer message for Tentative duplicate address detection (DAD).
- Refactor veinfo printing of iproute2 commands.

Fixes:
- Avoid moduleslist race condition (Hagbard Celine <hagbardcelin@gmail.com>)
- Delete IPv6 tunnel correctly (stkchp <s@tkch.net>)

Bug: https://bugs.gentoo.org/638836
Bug: https://bugs.gentoo.org/637474
Bug: https://bugs.gentoo.org/636846
Bug: gentoo/netifrc#24
Bug: gentoo/netifrc#26
Bug: gentoo/netifrc#25
Bug: gentoo/netifrc#27
Package-Manager: Portage-2.3.16, Repoman-2.3.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants