From 0beae43d41a6bd8e1997c7a0013fb9263d7774f9 Mon Sep 17 00:00:00 2001 From: runborg Date: Fri, 5 Jul 2019 22:23:59 +0200 Subject: T1499: Allow for usage of systemd interface mappings (#103) * T1499: Allow for usage of systemd interface mappings * T1499: Fix not working regex in ethernet interface parsing (cherry picked from commit eebb654d64fc8dafeecbda93414436a51881f776) --- sysconf/netdevice | 4 ++++ templates/interfaces/ethernet/node.def | 3 ++- templates/interfaces/tunnel/node.tag/dhcp-interface/node.def | 2 +- templates/system/ipv6/strict-dad/node.def | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sysconf/netdevice b/sysconf/netdevice index 417732c7..e9349789 100644 --- a/sysconf/netdevice +++ b/sysconf/netdevice @@ -2,6 +2,10 @@ lo loopback eth ethernet lan ethernet +eno ethernet +ens ethernet +enp ethernet +enx ethernet ifb input peth pseudo-ethernet br bridge diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def index b4e60340..2d66a11b 100644 --- a/templates/interfaces/ethernet/node.def +++ b/templates/interfaces/ethernet/node.def @@ -4,7 +4,8 @@ type: txt help: Ethernet interface name allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet val_help: ; Ethernet interface name -syntax:expression: pattern $VAR(@) "^(eth|lan)[0-9]+$" \ + /proc/sys/net/ipv6/conf/all/accept_dad" sudo sh -c "echo 1 > /proc/sys/net/ipv6/conf/default/accept_dad" - for ifname in /sys/class/net/eth* ; do + for ifname in /sys/class/net/eth* /sys/class/net/en* ; do if [ -d $ifname ]; then ifname=${ifname#/sys/class/net/} sudo sh -c "echo 1 > /proc/sys/net/ipv6/conf/$ifname/accept_dad" -- cgit v1.2.3