Commit 195624d
tun: support not enabling carrier in TUNSETIFF
This change adds support for not enabling carrier during TUNSETIFF
interface creation by specifying the IFF_NO_CARRIER flag.
Our tests make heavy use of tun interfaces. In some scenarios, the test
process creates the interface but another process brings it up after the
interface is discovered via netlink notification. In that case, it is
not possible to create a tun/tap interface with carrier off without it
racing against the bring up. Immediately setting carrier off via
TUNSETCARRIER is still too late.
Signed-off-by: Patrick Rohr <prohr@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Maciej Żenczykowski <maze@google.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 504c25c commit 195624d
2 files changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2828 | 2828 | | |
2829 | 2829 | | |
2830 | 2830 | | |
2831 | | - | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
2832 | 2835 | | |
2833 | 2836 | | |
2834 | 2837 | | |
| |||
3056 | 3059 | | |
3057 | 3060 | | |
3058 | 3061 | | |
3059 | | - | |
3060 | | - | |
| 3062 | + | |
| 3063 | + | |
3061 | 3064 | | |
3062 | 3065 | | |
3063 | 3066 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
0 commit comments