|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
From f432f7f9037833d77e6e0d16c275b950e1cd8e03 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
From: Susant Sahani <ssahani@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
Date: Sat, 20 Feb 2016 18:03:31 +0530
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
Subject: [PATCH] networkd: tunnel fix tunnel address
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
this fixes 2655
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
(cherry picked from commit 07dcb085893a2fe212b7e158028725876d2ab98f)
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
src/network/networkd-netdev-tunnel.c | 12 ++++++------
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
diff --git a/src/network/networkd-netdev-tunnel.c b/src/network/networkd-netdev-tunnel.c
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
index 46ff2974f4..7aaa041ba3 100644
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
--- a/src/network/networkd-netdev-tunnel.c
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
+++ b/src/network/networkd-netdev-tunnel.c
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
@@ -54,7 +54,7 @@ static int netdev_ipip_fill_message_create(NetDev *netdev, Link *link, sd_netlin
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(link);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(m);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(t);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
- assert(t->family == AF_INET || t->family != -1);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
+ assert(IN_SET(t->family, AF_INET, AF_UNSPEC));
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
r = sd_netlink_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
@@ -87,7 +87,7 @@ static int netdev_sit_fill_message_create(NetDev *netdev, Link *link, sd_netlink
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(link);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(m);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(t);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
- assert(t->family == AF_INET || t->family != -1);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
+ assert(IN_SET(t->family, AF_INET, AF_UNSPEC));
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
r = sd_netlink_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
@@ -124,7 +124,7 @@ static int netdev_gre_fill_message_create(NetDev *netdev, Link *link, sd_netlink
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
t = GRETAP(netdev);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(t);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
- assert(t->family == AF_INET || t->family != -1);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
+ assert(IN_SET(t->family, AF_INET, AF_UNSPEC));
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(link);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(m);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
@@ -497,7 +497,7 @@ static void ipip_init(NetDev *n) {
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(t);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
t->pmtudisc = true;
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
- t->family = -1;
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
+ t->family = AF_UNSPEC;
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
static void sit_init(NetDev *n) {
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
@@ -507,7 +507,7 @@ static void sit_init(NetDev *n) {
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(t);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
t->pmtudisc = true;
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
- t->family = -1;
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
+ t->family = AF_UNSPEC;
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
static void vti_init(NetDev *n) {
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
@@ -538,7 +538,7 @@ static void gre_init(NetDev *n) {
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
assert(t);
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
t->pmtudisc = true;
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
- t->family = -1;
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
+ t->family = AF_UNSPEC;
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
|
|
Zbigniew Jędrzejewski-Szmek |
2b6823 |
static void ip6gre_init(NetDev *n) {
|