chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
networkd: add support for source routing
[elogind.git]
/
src
/
network
/
networkd-netdev-tunnel.c
diff --git
a/src/network/networkd-netdev-tunnel.c
b/src/network/networkd-netdev-tunnel.c
index 5d5913186df61ee77e975aeaacd8925173c713b0..980c70ef550937868d644cdb9f6e18d224e76dcf 100644
(file)
--- a/
src/network/networkd-netdev-tunnel.c
+++ b/
src/network/networkd-netdev-tunnel.c
@@
-27,6
+27,7
@@
#include "sd-rtnl.h"
#include "networkd-netdev-tunnel.h"
#include "sd-rtnl.h"
#include "networkd-netdev-tunnel.h"
+#include "networkd-link.h"
#include "network-internal.h"
#include "util.h"
#include "missing.h"
#include "network-internal.h"
#include "util.h"
#include "missing.h"
@@
-44,7
+45,7
@@
static int netdev_ipip_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
r = sd_rtnl_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
if (r < 0) {
r = sd_rtnl_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_LINK attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_IPTUN_LINK attribute: %s",
strerror(-r));
return r;
@@
-52,7
+53,7
@@
static int netdev_ipip_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &t->local.in);
if (r < 0) {
r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &t->local.in);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_LOCAL attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_IPTUN_LOCAL attribute: %s",
strerror(-r));
return r;
@@
-60,7
+61,7
@@
static int netdev_ipip_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &t->remote.in);
if (r < 0) {
r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &t->remote.in);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_REMOTE attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_IPTUN_REMOTE attribute: %s",
strerror(-r));
return r;
@@
-68,12
+69,20
@@
static int netdev_ipip_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TTL, t->ttl);
if (r < 0) {
r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TTL, t->ttl);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_TTL attribute: %s",
strerror(-r));
return r;
}
"Could not append IFLA_IPTUN_TTL attribute: %s",
strerror(-r));
return r;
}
+ r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_PMTUDISC, t->pmtudisc);
+ if (r < 0) {
+ log_netdev_error(netdev,
+ "Could not append IFLA_IPTUN_PMTUDISC attribute: %s",
+ strerror(-r));
+ return r;
+ }
+
return r;
}
return r;
}
@@
-89,7
+98,7
@@
static int netdev_sit_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
if (r < 0) {
r = sd_rtnl_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_LINK attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_IPTUN_LINK attribute: %s",
strerror(-r));
return r;
@@
-97,7
+106,7
@@
static int netdev_sit_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &t->local.in);
if (r < 0) {
r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &t->local.in);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_LOCAL attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_IPTUN_LOCAL attribute: %s",
strerror(-r));
return r;
@@
-105,7
+114,7
@@
static int netdev_sit_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &t->remote.in);
if (r < 0) {
r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &t->remote.in);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_REMOTE attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_IPTUN_REMOTE attribute: %s",
strerror(-r));
return r;
@@
-113,12
+122,20
@@
static int netdev_sit_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TTL, t->ttl);
if (r < 0) {
r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TTL, t->ttl);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_TTL attribute: %s",
strerror(-r));
return r;
}
"Could not append IFLA_IPTUN_TTL attribute: %s",
strerror(-r));
return r;
}
+ r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_PMTUDISC, t->pmtudisc);
+ if (r < 0) {
+ log_netdev_error(netdev,
+ "Could not append IFLA_IPTUN_PMTUDISC attribute: %s",
+ strerror(-r));
+ return r;
+ }
+
return r;
}
return r;
}
@@
-134,7
+151,7
@@
static int netdev_gre_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_u32(m, IFLA_GRE_LINK, link->ifindex);
if (r < 0) {
r = sd_rtnl_message_append_u32(m, IFLA_GRE_LINK, link->ifindex);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_GRE_LINK attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_GRE_LINK attribute: %s",
strerror(-r));
return r;
@@
-142,7
+159,7
@@
static int netdev_gre_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_LOCAL, &t->local.in);
if (r < 0) {
r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_LOCAL, &t->local.in);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_GRE_LOCAL attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_GRE_LOCAL attribute: %s",
strerror(-r));
return r;
@@
-150,7
+167,7
@@
static int netdev_gre_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_REMOTE, &t->remote.in);
if (r < 0) {
r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_REMOTE, &t->remote.in);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_GRE_REMOTE attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_GRE_REMOTE attribute: %s",
strerror(-r));
return r;
@@
-158,7
+175,7
@@
static int netdev_gre_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_u8(m, IFLA_GRE_TTL, t->ttl);
if (r < 0) {
r = sd_rtnl_message_append_u8(m, IFLA_GRE_TTL, t->ttl);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_GRE_TTL attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_GRE_TTL attribute: %s",
strerror(-r));
return r;
@@
-166,12
+183,20
@@
static int netdev_gre_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_u8(m, IFLA_GRE_TOS, t->tos);
if (r < 0) {
r = sd_rtnl_message_append_u8(m, IFLA_GRE_TOS, t->tos);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_GRE_TOS attribute: %s",
strerror(-r));
return r;
}
"Could not append IFLA_GRE_TOS attribute: %s",
strerror(-r));
return r;
}
+ r = sd_rtnl_message_append_u8(m, IFLA_GRE_PMTUDISC, t->pmtudisc);
+ if (r < 0) {
+ log_netdev_error(netdev,
+ "Could not append IFLA_GRE_PMTUDISC attribute: %s",
+ strerror(-r));
+ return r;
+ }
+
return r;
}
return r;
}
@@
-187,7
+212,7
@@
static int netdev_vti_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_u32(m, IFLA_VTI_LINK, link->ifindex);
if (r < 0) {
r = sd_rtnl_message_append_u32(m, IFLA_VTI_LINK, link->ifindex);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_LINK attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_IPTUN_LINK attribute: %s",
strerror(-r));
return r;
@@
-195,7
+220,7
@@
static int netdev_vti_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_LOCAL, &t->local.in);
if (r < 0) {
r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_LOCAL, &t->local.in);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_LOCAL attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_IPTUN_LOCAL attribute: %s",
strerror(-r));
return r;
@@
-203,7
+228,7
@@
static int netdev_vti_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_REMOTE, &t->remote.in);
if (r < 0) {
r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_REMOTE, &t->remote.in);
if (r < 0) {
- log_
error_netdev
(netdev,
+ log_
netdev_error
(netdev,
"Could not append IFLA_IPTUN_REMOTE attribute: %s",
strerror(-r));
return r;
"Could not append IFLA_IPTUN_REMOTE attribute: %s",
strerror(-r));
return r;